Re: Facet count mismatch between solr simple facet and Json facet API.
Yes we are using distributed search using shard approach. -- View this message in context: http://lucene.472066.n3.nabble.com/Facet-count-mismatch-between-solr-simple-facet-and-Json-facet-API-tp4242461p4242646.html Sent from the Solr - User mailing list archive at Nabble.com.
Facet count mismatch between solr simple facet and Json facet API.
Hi I am using solr 5.3.1 in my application. I have indexed field named given below : And then using solr json facet API for faceting. But it seems that json facet API produce less and incorrect result counts than simple solr facet. The json facet request which I am doing is as below: json.facet={ TitleFacet: { type: terms, field: Title, offset: 0, limit: 100, mincount: 1, sort: { count: desc } } } gives for example 63 count. And then equivalent simple facet query given below facet=true&facet.field=Title&facet.limit=100&facet.mincount=1&facet.offset=0 gives 65 count. Is there any issue with Solr Json facet or am I doing anything wrong. Can anybody help me. -- View this message in context: http://lucene.472066.n3.nabble.com/Facet-count-mismatch-between-solr-simple-facet-and-Json-facet-API-tp4242461.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: FieldCache error for multivalued fields in json facets.
Hi I am using solr 5.3 and I have the same problem while doing json facet on multivalued field. Below is the error stack trace : 2015-09-21 21:26:09,292 ERROR org.apache.solr.core.SolrCore ? org.apache.solr.common.SolrException: can not use FieldCache on multivalued field: FLAG at org.apache.solr.schema.SchemaField.checkFieldCacheSource(SchemaField.java:187) at org.apache.solr.schema.TrieField.getValueSource(TrieField.java:231) at org.apache.solr.search.FunctionQParser.parseValueSource(FunctionQParser.java:378) at org.apache.solr.search.FunctionQParser.parseValueSource(FunctionQParser.java:235) at org.apache.solr.search.ValueSourceParser$79.parse(ValueSourceParser.java:845) at org.apache.solr.search.FunctionQParser.parseAgg(FunctionQParser.java:414) at org.apache.solr.search.facet.FacetParser.parseStringStat(FacetRequest.java:272) at org.apache.solr.search.facet.FacetParser.parseStringFacetOrStat(FacetRequest.java:265) at org.apache.solr.search.facet.FacetParser.parseFacetOrStat(FacetRequest.java:199) at org.apache.solr.search.facet.FacetParser.parseSubs(FacetRequest.java:179) at org.apache.solr.search.facet.FacetTopParser.parse(FacetRequest.java:427) at org.apache.solr.search.facet.FacetTopParser.parse(FacetRequest.java:416) at org.apache.solr.search.facet.FacetModule.prepare(FacetModule.java:125) at org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:251) at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:143) at org.apache.solr.core.SolrCore.execute(SolrCore.java:2068) at org.apache.solr.servlet.HttpSolrCall.execute(HttpSolrCall.java:669) at org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:462) at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:210) at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:179) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:142) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79) at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:617) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:518) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1091) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:668) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1521) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1478) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Unknown Source) -- View this message in context: http://lucene.472066.n3.nabble.com/FieldCache-error-for-multivalued-fields-in-json-facets-tp4216995p4230304.html Sent from the Solr - User mailing list archive at Nabble.com.
RE: Solr Unexpected Query Parser Exception
I think there is no issue with query escaping. I am doing shard query to my main solr server, and from inside the main solr server I am doing simple *:* query to another solr server by using solrj. But most of the time I get following error. Cannot parse '*:*': Encountered "" at line 1, column 1. -- View this message in context: http://lucene.472066.n3.nabble.com/Solr-Unexpected-Query-Parser-Exception-tp4194156p4213621.html Sent from the Solr - User mailing list archive at Nabble.com.
Solr Unexpected Query Parser Exception
Hi, I am using solr 4.10.3 and doing distributed shard query. I am getting following syntax exception at regular intervals. ERROR org.apache.solr.core.SolrCore ? org.apache.solr.common.SolrException: org.apache.solr.search.SyntaxError: Cannot parse '*:*': Encountered "" at line 1, column 3. Was expecting one of: "NOT" ... "+" ... "-" ... ... "(" ... "*" ... "^" ... ... ... ... ... ... ... "[" ... "{" ... ... ... ... ... ... "*" ... My query to solr is *:* can anyone explain me why this exception is occurring. -- View this message in context: http://lucene.472066.n3.nabble.com/Solr-Unexpected-Query-Parser-Exception-tp4194156.html Sent from the Solr - User mailing list archive at Nabble.com.
How To Interrupt Solr Query Execution
Hi, I am using solr 4.9 for searching over 90 million+ documents. My Solr is running on tomcat server and I am querying Solr from an application. I have a problem with long-running queries against Solr. Although I have set timeAllowed to 4ms, but it seems that solr still running this query until it processed fully. I read some articles where it is written that "*Internally, Solr does nothing to time out any requests -- it lets both updates and queries take however long they need to take to be processed fully.*" Is this what Solr does? If so, is there a configuration option to change this behavior? or can I interrupt solr query execution. -- View this message in context: http://lucene.472066.n3.nabble.com/How-To-Interrupt-Solr-Query-Execution-tp4175190.html Sent from the Solr - User mailing list archive at Nabble.com.
Increase maxBooleanClauses limit at run time
Hi I am using solr 4.9. I have set maxBooleanClauses to 2000 in solrconfig.xml. But my application need to change this limit at run time depending upon the query. So can I set this limit at run time for e.g. in SolrParam or in other ways. -- View this message in context: http://lucene.472066.n3.nabble.com/Increase-maxBooleanClauses-limit-at-run-time-tp4159578.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: How Can I modify the DocList and DocSet in solr
Thanks for the reply. I found one solution to modify DocList and DocSet after searching. Look At the following code snippet. private void sortByRecordIDNew(SolrIndexSearcher.QueryResult result, ResponseBuilder rb) throws IOException { DocList docList = result.getDocListAndSet().docList; SortedMap sortedMap = null; if (projectSort == 0) { sortedMap = new TreeMap(Collections.reverseOrder()); }else{ sortedMap = new TreeMap(); } Iterator iterator = docList.iterator(); while (iterator.hasNext()) { int docId = (int) iterator.next(); Document d = rb.req.getSearcher().doc(docId); Integer val = dbData.get(d.get("ID")); // dbData is a map contains the recordId from the database // and the Unique key in schema.xml sortedMap.put(val, docId); } float[] scores = new float[docList.size()]; int[] docs = new int[docList.size()]; int docCounter = 0; int maxScore = 0; Iterator it = sortedMap.keySet().iterator(); while (it.hasNext()) { int recordID = (int) it.next(); int docId = sortedMap.get(recordID); scores[docCounter] = 1.0f; docs[docCounter] = docId; docCounter++; } docList = new DocSlice(0, docCounter, docs, scores, 0, maxScore); result.setDocList(docList); } Call this method from QueryComponent's process method after the searching. In the above code I have sorted the DocList in ascending or descending order depends upon the user requirement. It works for me. -- View this message in context: http://lucene.472066.n3.nabble.com/How-Can-I-modify-the-DocList-and-DocSet-in-solr-tp4140754p4141132.html Sent from the Solr - User mailing list archive at Nabble.com.
How Can I modify the DocList and DocSet in solr
I am using solr 4.6 and I am using solr Sharding (Distributed Search). I have situation where I like to modify the solr search result (DocList and DocSet) inside solr QueryComponent right after the following method is called from process() method. searcher.search(result, cmd); Can I modify the DocList and DocSet after the search inside QueryComponent and add it to the QueryResult. Also can I make the DocList unsorted. -- View this message in context: http://lucene.472066.n3.nabble.com/How-Can-I-modify-the-DocList-and-DocSet-in-solr-tp4140754.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: Solr Shard Query From Inside Search Component Sometimes Gives Wrong Results
Hi Shalin, I am making simple facet query on shards and the sort order is based on the score. Actually sometimes I am getting the correct result from the shards. I am not indexing the data at the time of query. I think as I am making the shard query inside Solr search component, it is not waiting for the results from all the shards. Some shard gives the following parsing error when result comes incorrect org.apache.solr.common.SolrException: org.apache.solr.search.SyntaxError: org.apache.query.queryparser.ParseException: Cannot parse 'PNC:ca955235a1': Encountered "" at line 1, column 0. But this is the valid query. I have also the same problem outside of the search component. But when I tried the same approach from the SolrQueryComponent's createMainQuery() method it is working as desired. private void createMainQuery(ResponseBuilder rb) { // shard query works fine from here } -- View this message in context: http://lucene.472066.n3.nabble.com/Solr-Shard-Query-From-Inside-Search-Component-Sometimes-Gives-Wrong-Results-tp4120840p4121089.html Sent from the Solr - User mailing list archive at Nabble.com.
Solr Shard Query From Inside Search Component Sometimes Gives Wrong Results
Hi, I am using Solr 4.6 and doing Solr query on shard from inside Solr search component and try to use the obtained results for my custom logic. I have used a Solrj for doing distributed search, but the result coming from this distributed search vary some time. So the my questions are, 1. Can we do distributed search from Solr Search component. 2. Do we need to handle concurrency between Solr server by using synchronization or other technique. Is there a way to make a distributed search in the Solr Search Component and get the matched documents from all the shards? If anyone have Idea then help me. -- View this message in context: http://lucene.472066.n3.nabble.com/Solr-Shard-Query-From-Inside-Search-Component-Sometimes-Gives-Wrong-Results-tp4120840.html Sent from the Solr - User mailing list archive at Nabble.com.