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 "Dan A. Dickey" <da...@savvis.net> on 2009/09/02 22:49:17 UTC

Does the default operator affect phrase searching?

I'm having a problem with doing a phrase search of "david pdf".
When I search for just "david", I get 7 hits.  When I search for "pdf"
I get 73 hits.  On a legacy system, searching for "david pdf" I get
78 hits.  And on Solr (1.4 - one of the nightly builds) - when searching
for "david pdf" I get 0 hits.  I have the defaultOperator for my schema
set to AND - could this be causing the problem?
When I set {!lucene q.op=OR} in the query, I still get zero hits.

Suggestions?  Is there any way to debug *why* something didn't hit?
Or dump out what is contained in the index for one of the records?
Thanks.
	-Dan

-- 
Dan A. Dickey | Senior Software Engineer

Savvis
10900 Hampshire Ave. S., Bloomington, MN  55438
Office: 952.852.4803 | Fax: 952.852.4951
E-mail: dan.dickey@savvis.net

Re: Does the default operator affect phrase searching?

Posted by Chris Hostetter <ho...@fucit.org>.
: My problem was that somewhere along the way I picked up the mis-understanding
: that I could do a phrase search like Text:"david pdf" and Solr/lucene would pick up
: all documents that hit the field Text with either 'david' or 'pdf'.  Now, I'm just doing the

you were probably thinking of this...

    Text:(david pdf)


-Hoss


Re: Does the default operator affect phrase searching?

Posted by "Dan A. Dickey" <da...@savvis.net>.
On Wednesday 02 September 2009 16:37:03 Gérard Dupont wrote:
> >
> > Yes, it does - thanks!
> > Back to translating legacy search queries into Solr search queries.  :)
> >         -Dan
> >
> 
> Just curious : what legacy system is it ?

Sorry, but at the moment - I don't think I'm at liberty to say.

My problem was that somewhere along the way I picked up the mis-understanding
that I could do a phrase search like Text:"david pdf" and Solr/lucene would pick up
all documents that hit the field Text with either 'david' or 'pdf'.  Now, I'm just doing the
query as something like Text:"david" OR Text:"pdf".  This seems to work as expected,
and I'm getting 79 hits (it's ok to be one better than before - I imagine I'm doing
a little more indexing with Solr than legacy X).
	-Dan

-- 
Dan A. Dickey | Senior Software Engineer

Savvis
10900 Hampshire Ave. S., Bloomington, MN  55438
Office: 952.852.4803 | Fax: 952.852.4951
E-mail: dan.dickey@savvis.net

Re: Does the default operator affect phrase searching?

Posted by Gérard Dupont <ge...@gmail.com>.
>
> Yes, it does - thanks!
> Back to translating legacy search queries into Solr search queries.  :)
>         -Dan
>

Just curious : what legacy system is it ?

Re: Does the default operator affect phrase searching?

Posted by "Dan A. Dickey" <da...@savvis.net>.
On Wednesday 02 September 2009 16:00:55 Gérard Dupont wrote:
> Hi Dan,
> 
> Phrase search (ie using quote) in Lucene does exact match or your expression
> so if you type ["david pdf"] (brackets are there to limit the query in my
> mail only) the system search for a document that contain the term 'david'
> and the term 'pdf' separated by a space (well in the classic case, I suppose
> you don't have a specific query parser). So since your corpus does not
> contain any document with "david pdf" results are empty. In any case, the
> defaultOperator have nothing to do with this. It only occur if you do a
> query like ["david pdf" toto] then it will be interpreted as ["david pdf" OR
> toto] (given is is the default operator)
> 
> I don't know which other legacy system you also used, but this may be a
> complete different query syntax and so quote are not interpreted in the same
> way.
> 
> HTH

Yes, it does - thanks!
Back to translating legacy search queries into Solr search queries.  :)
	-Dan

> 
> gd
> 
> On Wed, Sep 2, 2009 at 22:49, Dan A. Dickey <da...@savvis.net> wrote:
> 
> > I'm having a problem with doing a phrase search of "david pdf".
> > When I search for just "david", I get 7 hits.  When I search for "pdf"
> > I get 73 hits.  On a legacy system, searching for "david pdf" I get
> > 78 hits.  And on Solr (1.4 - one of the nightly builds) - when searching
> > for "david pdf" I get 0 hits.  I have the defaultOperator for my schema
> > set to AND - could this be causing the problem?
> > When I set {!lucene q.op=OR} in the query, I still get zero hits.
> >
> > Suggestions?  Is there any way to debug *why* something didn't hit?
> > Or dump out what is contained in the index for one of the records?
> > Thanks.
> >        -Dan
> >
> > --
> > Dan A. Dickey | Senior Software Engineer
> >
> > Savvis
> > 10900 Hampshire Ave. S., Bloomington, MN  55438
> > Office: 952.852.4803 | Fax: 952.852.4951
> > E-mail: dan.dickey@savvis.net
> >
> 
> 
> 
> 

-- 
Dan A. Dickey | Senior Software Engineer

Savvis
10900 Hampshire Ave. S., Bloomington, MN  55438
Office: 952.852.4803 | Fax: 952.852.4951
E-mail: dan.dickey@savvis.net

Re: Does the default operator affect phrase searching?

Posted by Gérard Dupont <ge...@gmail.com>.
Hi Dan,

Phrase search (ie using quote) in Lucene does exact match or your expression
so if you type ["david pdf"] (brackets are there to limit the query in my
mail only) the system search for a document that contain the term 'david'
and the term 'pdf' separated by a space (well in the classic case, I suppose
you don't have a specific query parser). So since your corpus does not
contain any document with "david pdf" results are empty. In any case, the
defaultOperator have nothing to do with this. It only occur if you do a
query like ["david pdf" toto] then it will be interpreted as ["david pdf" OR
toto] (given is is the default operator)

I don't know which other legacy system you also used, but this may be a
complete different query syntax and so quote are not interpreted in the same
way.

HTH

gd

On Wed, Sep 2, 2009 at 22:49, Dan A. Dickey <da...@savvis.net> wrote:

> I'm having a problem with doing a phrase search of "david pdf".
> When I search for just "david", I get 7 hits.  When I search for "pdf"
> I get 73 hits.  On a legacy system, searching for "david pdf" I get
> 78 hits.  And on Solr (1.4 - one of the nightly builds) - when searching
> for "david pdf" I get 0 hits.  I have the defaultOperator for my schema
> set to AND - could this be causing the problem?
> When I set {!lucene q.op=OR} in the query, I still get zero hits.
>
> Suggestions?  Is there any way to debug *why* something didn't hit?
> Or dump out what is contained in the index for one of the records?
> Thanks.
>        -Dan
>
> --
> Dan A. Dickey | Senior Software Engineer
>
> Savvis
> 10900 Hampshire Ave. S., Bloomington, MN  55438
> Office: 952.852.4803 | Fax: 952.852.4951
> E-mail: dan.dickey@savvis.net
>



-- 
Gérard Dupont
Information Processing Control and Cognition (IPCC) - EADS DS
http://weblab-project.org

Document & Learning team - LITIS Laboratory

Re: Does the default operator affect phrase searching?

Posted by Walter Underwood <wu...@wunderwood.org>.
Is "pdf" inside the file or part of the file name?

What legacy system? I've helped write a couple of them. Some systems,  
like Ultraseek, add parts of the filename as searchable text.

wunder

On Sep 2, 2009, at 1:49 PM, Dan A. Dickey wrote:

> I'm having a problem with doing a phrase search of "david pdf".
> When I search for just "david", I get 7 hits.  When I search for "pdf"
> I get 73 hits.  On a legacy system, searching for "david pdf" I get
> 78 hits.  And on Solr (1.4 - one of the nightly builds) - when  
> searching
> for "david pdf" I get 0 hits.  I have the defaultOperator for my  
> schema
> set to AND - could this be causing the problem?
> When I set {!lucene q.op=OR} in the query, I still get zero hits.
>
> Suggestions?  Is there any way to debug *why* something didn't hit?
> Or dump out what is contained in the index for one of the records?
> Thanks.
> 	-Dan
>
> -- 
> Dan A. Dickey | Senior Software Engineer
>
> Savvis
> 10900 Hampshire Ave. S., Bloomington, MN  55438
> Office: 952.852.4803 | Fax: 952.852.4951
> E-mail: dan.dickey@savvis.net
>