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 solruser <so...@gmail.com> on 2007/05/02 01:44:19 UTC

Wondering about results from PhraseQuer

Hi Everyone,

Pardon me if this question might be asked here in the mailing list earlier.
I tried looking for this but I could not get any answers. I am querying
against indexes with a phrase query. And although I can see my terms
occurrence in the debug results I get the overall score to be "0". To give
the scenario, understand this that user runs a search for title which has
pretty common terms such as "how do I update" {all of the words appears
1000s of times in indexes } and they want to search "prison" the last term
appears not more than 1 or 2 times across the indexes. Now I have the
problem, if I try to run phrase query on this I get zero results and if I
run term query with boolean across all terms I have too many results to be
meaningful. So what and how should I arrange the query so that I can get
relevant results. Here are my debug results for my search query
=========================================================================

−
	
subject_t:"how do I prison"

subject_t:"how do I prison"

PhraseQuery(subject_t:"how do i prison")
subject_t:"how do i prison"

standard
−
	
−
	

0.0 = fieldWeight(subject_t:"how do i prison" in 9268), product of:
  0.0 = tf(phraseFreq=0.0)
  18.508762 = idf(subject_t: how=2225 do=3359 i=4918 prison=4)
  0.5 = fieldNorm(field=subject_t, doc=9268)

−
	

0.0 = fieldWeight(subject_t:"how do i prison" in 10424), product of:
  0.0 = tf(phraseFreq=0.0)
  18.508762 = idf(subject_t: how=2225 do=3359 i=4918 prison=4)
  0.5 = fieldNorm(field=subject_t, doc=10424)

−
	

0.0 = fieldWeight(subject_t:"how do i prison" in 12163), product of:
  0.0 = tf(phraseFreq=0.0)
  18.508762 = idf(subject_t: how=2225 do=3359 i=4918 prison=4)
  0.625 = fieldNorm(field=subject_t, doc=12163)

−
	

0.0 = fieldWeight(subject_t:"how do i prison" in 9289), product of:
  0.0 = tf(phraseFreq=0.0)
  18.508762 = idf(subject_t: how=2225 do=3359 i=4918 prison=4)
  0.625 = fieldNorm(field=subject_t, doc=9289)

−
	

0.0 = fieldWeight(subject_t:"how do i prison" in 14700), product of:
  0.0 = tf(phraseFreq=0.0)
  18.508762 = idf(subject_t: how=2225 do=3359 i=4918 prison=4)
  0.4375 = fieldNorm(field=subject_t, doc=14700)

−
	

0.0 = fieldWeight(subject_t:"how do i prison" in 11920), product of:
  0.0 = tf(phraseFreq=0.0)
  18.508762 = idf(subject_t: how=2225 do=3359 i=4918 prison=4)
  0.625 = fieldNorm(field=subject_t, doc=11920)

−
	

0.0 = fieldWeight(subject_t:"how do i prison" in 1278), product of:
  0.0 = tf(phraseFreq=0.0)
  18.508762 = idf(subject_t: how=2225 do=3359 i=4918 prison=4)
  0.375 = fieldNorm(field=subject_t, doc=1278)

−
	

0.0 = fieldWeight(subject_t:"how do i prison" in 3868), product of:
  0.0 = tf(phraseFreq=0.0)
  18.508762 = idf(subject_t: how=2225 do=3359 i=4918 prison=4)
  0.3125 = fieldNorm(field=subject_t, doc=3868)

−
	

0.0 = fieldWeight(subject_t:"how do i prison" in 3893), product of:
  0.0 = tf(phraseFreq=0.0)
  18.508762 = idf(subject_t: how=2225 do=3359 i=4918 prison=4)
  0.5 = fieldNorm(field=subject_t, doc=3893)

−
	

0.0 = fieldWeight(subject_t:"how do i prison" in 19024), product of:
  0.0 = tf(phraseFreq=0.0)
  18.508762 = idf(subject_t: how=2225 do=3359 i=4918 prison=4)
  0.5 = fieldNorm(field=subject_t, doc=19024)



=========================================================================

Thanks 
-- 
View this message in context: http://www.nabble.com/Wondering-about-results-from-PhraseQuer-tf3677924.html#a10277926
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Wondering about results from PhraseQuer

Posted by Chris Hostetter <ho...@fucit.org>.
: the scenario, understand this that user runs a search for title which has
: pretty common terms such as "how do I update" {all of the words appears
: 1000s of times in indexes } and they want to search "prison" the last term
: appears not more than 1 or 2 times across the indexes. Now I have the
: problem, if I try to run phrase query on this I get zero results and if I

if the word "rpison" doesn't appear anywhere near the words "how do i"
then a phrase search on "how do i prison" isn't going to find any
documents.  perhaps you should search on...

	+"how do i" +prison

..which will only return docs that match the phrase "how do i" and also
contain the word prison.

: 0.0 = fieldWeight(subject_t:"how do i prison" in 9268), product of:
:   0.0 = tf(phraseFreq=0.0)
:   18.508762 = idf(subject_t: how=2225 do=3359 i=4918 prison=4)
:   0.5 = fieldNorm(field=subject_t, doc=9268)

this would be my point before ... that phrase does not appear in the
document (hence the tf is zero)



-Hoss