Using OR along with join query results causing NullPointerException in Solr 4.7.2
Hello Lucene/Solr Experts, I am getting NullPointerException while using OR along with the join results. Following are the documents and fields configured in my solr server(version 4.7.2). *brands {id, brand_name}* *products {id, product_name, brand_id}* Following are the data indexed *BRANDS: {1, Apple}, {2, Samsung}, {3, HTC}* *PRODUCTS: {10, iPhone, 1}, {11, iPad, 1}, {12, Galaxy S3, 2}, {13, Galaxy Note, 2}, {14, Desire, 3}* I am trying to get all the products with brand_name is "Samsung" or product_name is "Desire" Query which i am trying is *brand_name:Samsung OR {!join from=brand_id to=id} product_name:Desire* But i am getting error saying ERROR [SolrDispatchFilter] null:java.lang.NullPointerException: while trying to invoke the method org.apache.lucene.search.Query.hashCode() of a null object loaded from field org.apache.solr.search.JoinQuery.q of an object loaded from local variable 'this' at org.apache.solr.search.JoinQuery.hashCode(JoinQParserPlugin.java:594) at org.apache.lucene.search.BooleanClause.hashCode(BooleanClause.java:99) at java.util.AbstractList.hashCode(AbstractList.java:541) at org.apache.lucene.search.BooleanQuery.hashCode(BooleanQuery.java:520) at org.apache.solr.search.QueryResultKey.(QueryResultKey.java:47) at org.apache.solr.search.SolrIndexSearcher.getDocListC(SolrIndexSearcher.java:1305) at org.apache.solr.search.SolrIndexSearcher.search(SolrIndexSearcher.java:476) at org.apache.solr.handler.component.QueryComponent.process(QueryComponent.java:461) at org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:217) at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:135) at org.apache.solr.core.SolrCore.execute(SolrCore.java:1916) at org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:768) at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:415) at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:205) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:173) at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182) at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104) at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447) at java.lang.Thread.run(Thread.java:812) What is right to use OR along with join query results? I also wanted to group multiple join results using OR. Something like following query *( field1:value1 OR field2:value2 OR field3:value3 OR {!join from=some_id to=some_other_id} field4:value4 OR {!join from=some_field_is to=some_other_field_id} field5:value5)* *AND field7:value7 AND datefield1:{* TO 2015-11-30T14:28:11Z } AND datefield2:{2015-11-30T14:28:11Z TO *}* Please suggest if any other way is there to do this. Thanks in advance. Regards, Suren.
Not able to query strings ending with special characters.
Unable to query strings ending with special characters, it is skipping the last special character and giving the results. I am including the string in double quotes. For example i am unable to query strings like "JOHNSON &", "PEOPLES'". It queries well for "JOHNSON & SONS", "PEOPLES' SELF-HELP" I tried giving following values in fq field in solr UI. ORGANIZATION_NAM:"peoples'" ORGANIZATION_NAM:"peoples\'" I am also getting same results from solrj. my schema -- View this message in context: http://lucene.472066.n3.nabble.com/Not-able-to-query-strings-ending-with-special-characters-tp4107471.html Sent from the Solr - User mailing list archive at Nabble.com.
adding wild card at the end of the text and search(like sql like search)
My field type is text and i am using WhitespaceTokenizer. I want to search like SQL like search ie I want to search for ORGANIZATION_NAME field ORGANIZATION_NAM:"JOHNSON & SO"* should return "JOHNSON & SON", "JOHNSON & SONS", "JOHNSON & SONS COMPANY"... I tried ORGANIZATION_NAM:"JOHNSON &" AND ORGANIZATION_NAM:SON* Problem with this is It will bring "SWANK & SON, INC. C/O EVELYN JOHNSON". I want the result to be like SQL like search. -- View this message in context: http://lucene.472066.n3.nabble.com/adding-wild-card-at-the-end-of-the-text-and-search-like-sql-like-search-tp4108399.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: adding wild card at the end of the text and search(like sql like search)
Ahmet, I am using solr 4.3.1. do i still need to apply this patch ? if yes please tell me the steps to follow. In the given link i see lot of patches, not sure which patch for what version of solr also i don't see the patch note how to apply. Thanks, Suren. -- View this message in context: http://lucene.472066.n3.nabble.com/adding-wild-card-at-the-end-of-the-text-and-search-like-sql-like-search-tp4108399p4108765.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: adding wild card at the end of the text and search(like sql like search)
Ahmet, It did not solve the problem. I added 1)ComplexPhrase-4.2.1.jar to my local solr "solr-4.3.1\example\solr\collection1\lib" 2)added the below content to "solrConfig.xml" false 3)re-started solr, appended the Query param "defType=unorderedcomplexphrase" and ran the query, still issue present. http://localhost:8983/solr/collection1/select?q=*%3A*&fq=ORGANIZATION_NAM%3A%22JOHNSON+%26+SO*%22&wt=xml&indent=true&defType=unorderedcomplexphrase Please let me know if i am missing anything? -- View this message in context: http://lucene.472066.n3.nabble.com/adding-wild-card-at-the-end-of-the-text-and-search-like-sql-like-search-tp4108399p4109221.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: adding wild card at the end of the text and search(like sql like search)
by using Q command and passing query parameter defType=unorderedcomplexphrase it worked for me. http://localhost:8999/solr/MACSearch/select?q=LAST_NAM%3A%22DE+PAR*%22%0A&wt=xml&indent=true&defType=unorderedcomplexphrase Thanks. -- View this message in context: http://lucene.472066.n3.nabble.com/adding-wild-card-at-the-end-of-the-text-and-search-like-sql-like-search-tp4108399p4109796.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: "delta-import" giving Total Documents Processed = 0
I think issue was with deltaImportQuery, it is case sensitive. I was using '${dataimporter.delta.clai_idn}' instead of '${dataimporter.delta.CLAI_IDN}' -- View this message in context: http://lucene.472066.n3.nabble.com/delta-import-giving-Total-Documents-Processed-0-tp4089118p4109798.html Sent from the Solr - User mailing list archive at Nabble.com.
RE: Need help with delta import
Any update? I am also having the same issue. pls reply. This XML file does not appear to have any style information associated with it. The document tree is shown below. 0 7 db-data-config.xml delta-import idle 2 1 0 2013-09-10 07:46:34 2013-09-10 07:46:34 2013-09-10 07:46:35 2013-09-10 07:46:35 1 0 0:0:1.30 This response format is experimental. It is likely to change in the future. -- View this message in context: http://lucene.472066.n3.nabble.com/Need-help-with-delta-import-tp4025003p4089093.html Sent from the Solr - User mailing list archive at Nabble.com.
"delta-import" giving Total Documents Processed = 0
I am using solr 4.3.1, during Delta-import, i am always getting "Total Documents Processed" as 0 enenthough it is getting the changed documents. And no error in the log. I tried with "dih" instead of "dataimporter", still same issue. Any suggestions please? --- 0 7 db-data-config.xml delta-import idle 2 1 0 2013-09-10 07:46:34 2013-09-10 07:46:34 2013-09-10 07:46:35 2013-09-10 07:46:35 1 0 0:0:1.30 This response format is experimental. It is likely to change in the future. Thanks, Suren. -- View this message in context: http://lucene.472066.n3.nabble.com/delta-import-giving-Total-Documents-Processed-0-tp4089118.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: "delta-import" giving Total Documents Processed = 0
I am aware of this..my actual delta query is like below, to test the issue, i restricted the delta query to one record earlier. deltaQuery ="select distinct clai_idn as clai_idn from claim_history where TO_CHAR(EVENT_DTE , '-MM-DD HH24\:MI\:SS') > to_CHAR(TO_DATE('${dataimporter.last_index_time}', '-MM-DD HH24\:MI\:SS'),'-MM-DD HH24\:MI\:SS') "> -- View this message in context: http://lucene.472066.n3.nabble.com/delta-import-giving-Total-Documents-Processed-0-tp4089118p4089148.html Sent from the Solr - User mailing list archive at Nabble.com.
sorting using org.apache.solr.client.solrj.SolrQuery not working
I tried below 3 methods to sort the output from solr 4.3.1., no error and not sorting on any given field. 1)addSort(field, order) 2)addOrUpdateSort(field, order) 3)setSort(field, order) my schema setting for the fields i tried are Any one please tell me why the sorting is not working? -- View this message in context: http://lucene.472066.n3.nabble.com/sorting-using-org-apache-solr-client-solrj-SolrQuery-not-working-tp4089985.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: sorting using org.apache.solr.client.solrj.SolrQuery not working
Shawn, I am doing exactly same. Data output is not sorting on "LAST_NAME" column , but it is always sorting on different column "CLAIM_NUM", and I am not adding this sorting condition( sort on CLAIM_NUM). solrQuery.setQuery("*:*"); solrQuery.setSort("LAST_NAM",SolrQuery.ORDER.asc); solrQuery.setFilterQueries("String Query"); In the log i see the sorting column as "LAST_NAM". Is there a difference between "LAST_NAM asc" and "LAST_NAM+asc"...I see only this diff? "params={sort=LAST_NAM+asc&start=0&q=*:*&wt=javabin&fq=(LAST_NAM:*D*)+AND++-CLAI_RISK_MNGT_FLG+:+Y+&version=2&rows=30} hits=196 status=0 QTime=2 " CLAI_IDN I also tried addOrUpdateSort and addSort, But it is always sorting on CLAI_CLM_NUM, not sure why? -- View this message in context: http://lucene.472066.n3.nabble.com/sorting-using-org-apache-solr-client-solrj-SolrQuery-not-working-tp4089985p4090364.html Sent from the Solr - User mailing list archive at Nabble.com.
Help on solr more like this functionality
Hi, We are trying to solve a business problem by performing solr more like this query. We are able to perform the more like this search. We have a specific use case that requires different boost on different match fields. Say i do more like this based on fields title and description of products. I wanna provide more boost for match field *title *than the description. Query im trying so far is mysolrhost:8983/solr/mlt?q=id:UTF8TEST&mlt.fl=title,description&mlt.mindf=1&mlt.mintf=1 Is there any way to provide different boost for title and description? Many thanks, Suren.