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 Mani <me...@art.com> on 2012/09/12 02:29:18 UTC

Partial search

I have three documents with the following search field (text_en type) values. 

When I search for "Energy Field", I am getting the document in this order
presented. However if you look at the match, I would expect the Doc3 should
come first and Doc1 should be the last. 


Doc1 : Automic Energy and Peace
Doc2 : Energy One Energy Two Energy Three Energy Four
Doc3 : Mathematic Field Energy Field

What is the best way to configure my search to accomodate as many terms
match as possible?







--
View this message in context: http://lucene.472066.n3.nabble.com/Partial-search-tp4007097.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Partial search

Posted by Mani <me...@art.com>.
Thanks for your reply!

The version I am using is 3.6. I have deleted the document and added it
again as a single field. Now I see the result as expected. I am also using
the standard stop word list. There is no stop words for both "Engergy" and
"Field".

The search field "text" is a copy field of multiple source fields like
here...

<copyField dest="text" source="Subject"/>
<copyField dest="text" source="Name"/>

The example I have given is not that sufficient as I was also trying to get
a Subject Field gets a boost over Name Field through copyField "text" which
I think is not possible.

http://stackoverflow.com/questions/6332892/solr-index-time-field-boost

 I am using OR condition instead of AND. AND will work for 3 or less but
does not work good more than 3 terms in the search query. I could use
defType=disMax and mm=2 parameters. 




--
View this message in context: http://lucene.472066.n3.nabble.com/Partial-search-tp4007097p4007536.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Partial search

Posted by Jack Krupansky <ja...@basetechnology.com>.
Add &debugQuery=true to your query request and look at the "explain" 
section. The scores will indicate why a document ranks as it does.

When you say that your query was "Energy Field", was that a quoted phrase or 
just two keywords? I assume the latter. I also assume that you were using 
the "OR" operator as default (not "AND"). Is that the case? Are you 
filtering out stop words at index time?

I tried your three test docs on the Solr 4.0-BETA example schema (putting 
the doc text in the "features_en" dynamic field) and your query actually 
reorders the three docs as expected, doc3, doc2, doc1.

What release of Solr are you using?

There is probably additional info you are not telling us. See if you can 
reproduce the scenario using only the stock Solr example schema. And if you 
have to make changes, tell us what they are.

-- Jack Krupansky

-----Original Message----- 
From: Mani
Sent: Tuesday, September 11, 2012 8:29 PM
To: solr-user@lucene.apache.org
Subject: Partial search

I have three documents with the following search field (text_en type) 
values.

When I search for "Energy Field", I am getting the document in this order
presented. However if you look at the match, I would expect the Doc3 should
come first and Doc1 should be the last.


Doc1 : Automic Energy and Peace
Doc2 : Energy One Energy Two Energy Three Energy Four
Doc3 : Mathematic Field Energy Field

What is the best way to configure my search to accomodate as many terms
match as possible?







--
View this message in context: 
http://lucene.472066.n3.nabble.com/Partial-search-tp4007097.html
Sent from the Solr - User mailing list archive at Nabble.com.