Hello,
I have a piece of code to perform some custom solr search in one of my API implemented in an XWiki extension
Query slrQuery = this.queryManager.createQuery(String.format("*%s*", driveId), "solr");
List<String> filterQuery = new ArrayList<String>();
// We want only visible documents with a CollabClass
filterQuery.add("{!tag=type}type:(\"DOCUMENT\")");
filterQuery.add("class:Collaboratory.Apps.Drive.Code.DriveClass");
filterQuery.add("hidden:false");
//filterQuery.add("defType=dismax");
List<String> qf = new ArrayList<String>();
qf.add(DriveSearchResult.fieldMap.get("DriveRepositoryId"));
slrQuery.bindValue("qf", qf);
QueryResponse response = null;
SolrDocumentList documents = null;
response = (QueryResponse) slrQuery.execute().get(0);
documents = response.getResults();
I read that I should use a KeywordTokenizer to perform exact match in solr
https://solr.apache.org/guide/6_6/tokenizers.html
But how can I configure that in XWiki with embedded solr ? Or is it possible to perform the exact search just on this query ? I don’t wan’t it apply to the default XWiki solr search.