lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emir Arnautović <emir.arnauto...@sematext.com>
Subject Re: Help with Boolean search using Solr parser edismax
Date Thu, 01 Feb 2018 15:01:05 GMT
Hi Wendy,
Query now looks as expected but you are not getting results as expected. The reason for that
is edismax’s mm parameter is what matters. You are setting it to 7 and you have two parts
to match so it is always AND and you don’t have such documents. You can set it to 1 and
it will be OR.
If you really need to have OR between some edismax query and some other query, you will have
to use standard parser and use _query, something like:

/select?q=method:”x-ray*” OR _query({!edismax mm=7 qf=‘title_field_stem^3,….’}”Solution
NMR”).

You can put it in config and use placeholders to pass values.

HTH,
Emir
--
Monitoring - Log Management - Alerting - Anomaly Detection
Solr & Elasticsearch Consulting Support Training - http://sematext.com/



> On 1 Feb 2018, at 15:25, Wendy2 <wendy.tao@rcsb.org> wrote:
> 
> Good morning, Emir,
> 
> Here are the debug output for case 1f-a (q=method:"x-ray*" "Solution NMR"),
> 1f-b (q=+method:"x-ray*" +"Solution NMR"). both returned zero counts. It
> looks that the querystrings are the same.   Thanks for following up on my
> post and your help! -- Wendy
> 
> 
> *=====================DebugQuery Outputs for case 1f-a,
> 1f-b=======================*
> *1f-a (/search?q=method:"x-ray*" "Solution NMR"): result count = 0*
> "debug":{
>    "rawquerystring":"method:\"x-ray*\" \"Solution NMR\"",
>    "querystring":"method:\"x-ray*\" \"Solution NMR\"",
>    "parsedquery":"(+(PhraseQuery(method:\"x rai\")
> DisjunctionMaxQuery(((pdb_id:Solution NMR)^5.0 |
> (entity_name_com.name:\"solut nmr\")^20.0 | (citation_author.name:\"solut
> nmr\")^5.0 | (audit_author.name:\"solut nmr\")^5.0 |
> rest_fields_stem:\"solut nmr\" | (title_fields_stem:\"solut nmr\")^3.0 |
> (classification:\"solut nmr\")^15.0 | (struct_keywords.text:\"solut
> nmr\")^12.0 | (entity.pdbx_description:\"solut nmr\")^10.0 |
> (pdbx_descriptor_stem:\"solut nmr\")^10.0 | (citation.title:\"solut
> nmr\")^25.0 | (struct_keywords.pdbx_keywords:\"solut nmr\")^15.0 |
> (entity_src_gen_concat_stem:\"solut nmr\")^15.0 | (struct.title:\"solut
> nmr\")^35.0 | (group_id_stem:\"solut nmr\")^10.0)))~2)/no_coord",
>    "parsedquery_toString":"+((method:\"x rai\" ((pdb_id:Solution NMR)^5.0 |
> (entity_name_com.name:\"solut nmr\")^20.0 | (citation_author.name:\"solut
> nmr\")^5.0 | (audit_author.name:\"solut nmr\")^5.0 |
> rest_fields_stem:\"solut nmr\" | (title_fields_stem:\"solut nmr\")^3.0 |
> (classification:\"solut nmr\")^15.0 | (struct_keywords.text:\"solut
> nmr\")^12.0 | (entity.pdbx_description:\"solut nmr\")^10.0 |
> (pdbx_descriptor_stem:\"solut nmr\")^10.0 | (citation.title:\"solut
> nmr\")^25.0 | (struct_keywords.pdbx_keywords:\"solut nmr\")^15.0 |
> (entity_src_gen_concat_stem:\"solut nmr\")^15.0 | (struct.title:\"solut
> nmr\")^35.0 | (group_id_stem:\"solut nmr\")^10.0))~2)",
> 
> 
> *1f-b (/search?q=+method:"x-ray*" +"Solution NMR") result count = 0:*
> "debug":{
>    "rawquerystring":" method:\"x-ray*\"  \"Solution NMR\"",
>    "querystring":" method:\"x-ray*\"  \"Solution NMR\"",
>    "parsedquery":"(+(PhraseQuery(method:\"x rai\")
> DisjunctionMaxQuery(((pdb_id:Solution NMR)^5.0 |
> (entity_name_com.name:\"solut nmr\")^20.0 | (citation_author.name:\"solut
> nmr\")^5.0 | (audit_author.name:\"solut nmr\")^5.0 |
> rest_fields_stem:\"solut nmr\" | (title_fields_stem:\"solut nmr\")^3.0 |
> (classification:\"solut nmr\")^15.0 | (struct_keywords.text:\"solut
> nmr\")^12.0 | (entity.pdbx_description:\"solut nmr\")^10.0 |
> (pdbx_descriptor_stem:\"solut nmr\")^10.0 | (citation.title:\"solut
> nmr\")^25.0 | (struct_keywords.pdbx_keywords:\"solut nmr\")^15.0 |
> (entity_src_gen_concat_stem:\"solut nmr\")^15.0 | (struct.title:\"solut
> nmr\")^35.0 | (group_id_stem:\"solut nmr\")^10.0)))~2)/no_coord",
>    "parsedquery_toString":"+((method:\"x rai\" ((pdb_id:Solution NMR)^5.0 |
> (entity_name_com.name:\"solut nmr\")^20.0 | (citation_author.name:\"solut
> nmr\")^5.0 | (audit_author.name:\"solut nmr\")^5.0 |
> rest_fields_stem:\"solut nmr\" | (title_fields_stem:\"solut nmr\")^3.0 |
> (classification:\"solut nmr\")^15.0 | (struct_keywords.text:\"solut
> nmr\")^12.0 | (entity.pdbx_description:\"solut nmr\")^10.0 |
> (pdbx_descriptor_stem:\"solut nmr\")^10.0 | (citation.title:\"solut
> nmr\")^25.0 | (struct_keywords.pdbx_keywords:\"solut nmr\")^15.0 |
> (entity_src_gen_concat_stem:\"solut nmr\")^15.0 | (struct.title:\"solut
> nmr\")^35.0 | (group_id_stem:\"solut nmr\")^10.0))~2)",
> 
> 
> 
> --
> Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html


Mime
View raw message