Is it possible to escape some texts from Solr query?
One of the ID attribute which we are using to query is AND so our looks like http://localhost:8983/solr//select?fq=id:AND&wt=json This throws below mentioned exception error: { metadata: [ "error-class", "org.apache.solr.common.SolrException", "root-error-class", "org.apache.solr.parser.ParseException" ], msg: "org.apache.solr.search.SyntaxError: Cannot parse 'id:AND': Encountered " "AND "" at line 1 I can escape AND by using below mentioned queries http://localhost:8983/solr//select?fq=entityId:\AND&wt=json http://localhost:8983/solr//select?fq=entityId:%22AND%22&wt=json Question: I do not want to handle this while making a query. Is there any other way to handle this at Solr config level using tokenizer or some other way. This way I do not have to handle this at multiple places. -- Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html
Solr still gives old data while faceting from the deleted documents
Solr gives old data while faceting from old deleted or updated documents. For example we are doing faceting on name. name changes frequently for our application. When we index the document after changing the name we get both old name and new name in the search results. After digging more on this I got to know that Solr indexes are composed of segments (write once) and each segment contains set of documents. Whenever hard commit happens these segments will be closed and even if a document is deleted after that it will still have those documents (which will be marked as deleted). These documents will not be cleared immediately. It will not be displayed in the search result though, but somehow faceting is still able to access those data. Optimizing fixed this issue. But we cannot perform this each time customer changes data on production. I tried below options and that did not work for me. 1) *expungeDeletes*. Added this line below in solrconfig.xml 3 false 1 // This is not working. I do not think I can add expungeDeletes configuration like this. When I make expungeDeletes call using curl command its merging the segments. 2) Using *TieredMergePolicyFactory* might not help me as the threshold might not reach always and user will see old data during this time. 3) One more way of doing it is calling *optimize*() method which is exposed in solrj daily once. But not sure what impact this will have on performance. 4) Tried manipulating filterCache, documentCache and queryResultCache. I do not think whatever the issue I am facing is because of these caches. Number of documents we index per server will be maximum 2M-3M. Please suggest if there is any solution to this. Let me know if more data needed. -- Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html
Solr still gives old data while faceting from the deleted documents
Solr gives old data while faceting from old deleted or updated documents. For example we are doing faceting on name. name changes frequently for our application. When we index the document after changing the name we get both old name and new name in the search results. After digging more on this I got to know that Solr indexes are composed of segments (write once) and each segment contains set of documents. Whenever hard commit happens these segments will be closed and even if a document is deleted after that it will still have those documents (which will be marked as deleted). These documents will not be cleared immediately. It will not be displayed in the search result though, but somehow faceting is still able to access those data. Optimizing fixed this issue. But we cannot perform this each time customer changes data on production. I tried below options and that did not work for me. 1) *expungeDeletes*. Added this line below in solrconfig.xml 3 false 1 // This is not working. I don't think I can use expungeDeletes like this in solrConfig.xml When I send commit parameters in update URL it is working. 2) Using *TieredMergePolicyFactory* might not help me as the threshold might not reach always and user will see old data during this time. 3) One more way of doing it is calling *optimize*() method which is exposed in solrj daily once. But not sure what impact this will have on performance. 4) Tried to manipulate filterCache, documentCache and queryResultCache in solrConfig.xml This did not solve my issue as well. I do not think any cache is causing this issue. Number of documents we index per server will be maximum 2M-3M. Please suggest if there is any solution to this apart from expungeDeletes/optimize. Let me know if more data needed. -- Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html
Re: Solr still gives old data while faceting from the deleted documents
mincount will fix this issue for sure. I have tried that but the requirement is to show facets with 0 count as disabled. I think I left with only 2 options. Either go with expungeDelets with update URL or use optimize in a scheduler. Regards, Vignesh -- Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html