You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by KRIS MUSSHORN <mu...@comcast.net> on 2017/02/01 12:43:42 UTC

Re: Query structure

I really need some guidance on this query structure issue. 

I've got to get this solved today for my employer. 

"Help me Obiwan. Your my only hope" 

K 

----- Original Message -----

From: "KRIS MUSSHORN" <mu...@comcast.net> 
To: solr-user@lucene.apache.org 
Sent: Tuesday, January 31, 2017 12:31:13 PM 
Subject: Query structure 

I have a defaultSearchField and facetMetatagDatePrefix4 fields that are correctly populated with values in SOLR 5.4.1. 

if execute this query q=defaultSearchField:this text 
I get the 7 docs that match. 
Their are three docs in 2015 and one doc in 2016 per the facet counts in the results. 
If I then q=defaultSearchField:this text AND facetMetatagDatePrefix4:2015 i get the correct 3 documents. 

How would I structure my query to get defaultSearchField:this text AND (facetMetatagDatePrefix4:2015 OR facetMetatagDatePrefix4:2016) and return only 4 docs? 

TIA, 
Kris 



Re: Query structure

Posted by "Maciej Ł. PCSS" <la...@man.poznan.pl>.
Why not use filtering query? I mean the 'fq' param.

Regards
Maciej


W dniu 01.02.2017 o 13:43, KRIS MUSSHORN pisze:
> I really need some guidance on this query structure issue.
>
> I've got to get this solved today for my employer.
>
> "Help me Obiwan. Your my only hope"
>
> K
>
> ----- Original Message -----
>
> From: "KRIS MUSSHORN" <mu...@comcast.net>
> To: solr-user@lucene.apache.org
> Sent: Tuesday, January 31, 2017 12:31:13 PM
> Subject: Query structure
>
> I have a defaultSearchField and facetMetatagDatePrefix4 fields that are correctly populated with values in SOLR 5.4.1.
>
> if execute this query q=defaultSearchField:this text
> I get the 7 docs that match.
> Their are three docs in 2015 and one doc in 2016 per the facet counts in the results.
> If I then q=defaultSearchField:this text AND facetMetatagDatePrefix4:2015 i get the correct 3 documents.
>
> How would I structure my query to get defaultSearchField:this text AND (facetMetatagDatePrefix4:2015 OR facetMetatagDatePrefix4:2016) and return only 4 docs?
>
> TIA,
> Kris
>
>
>


Re: Query structure

Posted by KRIS MUSSHORN <mu...@comcast.net>.
This was the solution. 
Thank you! 

----- Original Message -----

From: "Maciej Ł. PCSS" <la...@man.poznan.pl> 
To: solr-user@lucene.apache.org 
Sent: Wednesday, February 1, 2017 7:57:05 AM 
Subject: Re: Query structure 

You should be able to put 'facetMetatagDatePrefix4:2015 OR 
facetMetatagDatePrefix4:2016' into the filtering query. 

Maciej 


W dniu 01.02.2017 o 13:43, KRIS MUSSHORN pisze: 
> I really need some guidance on this query structure issue. 
> 
> I've got to get this solved today for my employer. 
> 
> "Help me Obiwan. Your my only hope" 
> 
> K 
> 
> ----- Original Message ----- 
> 
> From: "KRIS MUSSHORN" <mu...@comcast.net> 
> To: solr-user@lucene.apache.org 
> Sent: Tuesday, January 31, 2017 12:31:13 PM 
> Subject: Query structure 
> 
> I have a defaultSearchField and facetMetatagDatePrefix4 fields that are correctly populated with values in SOLR 5.4.1. 
> 
> if execute this query q=defaultSearchField:this text 
> I get the 7 docs that match. 
> Their are three docs in 2015 and one doc in 2016 per the facet counts in the results. 
> If I then q=defaultSearchField:this text AND facetMetatagDatePrefix4:2015 i get the correct 3 documents. 
> 
> How would I structure my query to get defaultSearchField:this text AND (facetMetatagDatePrefix4:2015 OR facetMetatagDatePrefix4:2016) and return only 4 docs? 
> 
> TIA, 
> Kris 
> 
> 
> 



Re: Query structure

Posted by "Maciej Ł. PCSS" <la...@man.poznan.pl>.
You should be able to put 'facetMetatagDatePrefix4:2015 OR 
facetMetatagDatePrefix4:2016' into the filtering query.

Maciej


W dniu 01.02.2017 o 13:43, KRIS MUSSHORN pisze:
> I really need some guidance on this query structure issue.
>
> I've got to get this solved today for my employer.
>
> "Help me Obiwan. Your my only hope"
>
> K
>
> ----- Original Message -----
>
> From: "KRIS MUSSHORN" <mu...@comcast.net>
> To: solr-user@lucene.apache.org
> Sent: Tuesday, January 31, 2017 12:31:13 PM
> Subject: Query structure
>
> I have a defaultSearchField and facetMetatagDatePrefix4 fields that are correctly populated with values in SOLR 5.4.1.
>
> if execute this query q=defaultSearchField:this text
> I get the 7 docs that match.
> Their are three docs in 2015 and one doc in 2016 per the facet counts in the results.
> If I then q=defaultSearchField:this text AND facetMetatagDatePrefix4:2015 i get the correct 3 documents.
>
> How would I structure my query to get defaultSearchField:this text AND (facetMetatagDatePrefix4:2015 OR facetMetatagDatePrefix4:2016) and return only 4 docs?
>
> TIA,
> Kris
>
>
>