Result orde is different from I expect

2009-06-19 Thread akinori

I am straggling with search result order of Solr.
I indexed a English-certain language dictionary to Solr.

Then below is the result of query="apple" and I am confused with this. Why
doesn't "apple" come first and then Apple ?
I'd like to have your suggestion to fix this to more. I am really stressed
about this these days.
Any input is much appreciated.

Thanks

(example word list)
An apple!
A as in apple
appl.
apple
Apple
apples
Appling
apples to apples
Adam's apple
allergic apples
alley apple
apple allergy
apple compote
apple divider
bad apple 

(schema.xml)






  

  

















-- 
View this message in context: 
http://www.nabble.com/Result-orde-is-different-from-I-expect-tp24113572p24113572.html
Sent from the Solr - User mailing list archive at Nabble.com.



Re: Result orde is different from I expect

2009-06-19 Thread akinori

Sorry below is full "schema.xml"







  

  















































  

  




  









  

  







  





  







  




  



  







  








  



  


  






 


 
   
  
   
   

   

   

   
   
   
   
   
   
   
   
   

   

   
   

 

 
 word

 
 word

 
 

  

  

 
 
 
 




-- 
View this message in context: 
http://www.nabble.com/Result-orde-is-different-from-I-expect-tp24113572p24113668.html
Sent from the Solr - User mailing list archive at Nabble.com.



Re: Result orde is different from I expect

2009-06-19 Thread akinori

Thank you for your input to such a beginner.

I did'nt think that I had to do something for sorting when I get search
result. I originally thought Solr would automatically sort.
I think the result is the order I indexed. So how could I get so-called
"dictionally ordered" result? 
Many thanks!



Hello,

If you first indexed "apple" and then you indexed "Apple" and if you are
lowercasing this text before indexing (i.e. using LowerCaseFilterFactory),
then if you search for "apple", you should fist get "apple", and then
"Apple".  If you first indexed "Apple" and then "apple", then a search for
"apple" will first return "Apple", followed by "apple".  I am assuming you
are not sorting the results, but maybe you are?


Otis 
--
Sematext -- http://sematext.com/ -- Lucene - Solr - Nutch



- Original Message 
> From: akinori 
> To: solr-user@lucene.apache.org
> Sent: Friday, June 19, 2009 11:23:14 AM
> Subject: Result orde is different from I expect
> 
> 
> I am straggling with search result order of Solr.
> I indexed a English-certain language dictionary to Solr.
> 
> Then below is the result of query="apple" and I am confused with this. Why
> doesn't "apple" come first and then Apple ?
> I'd like to have your suggestion to fix this to more. I am really stressed
> about this these days.
> Any input is much appreciated.
> 
> Thanks
> 
> (example word list)
> An apple!
> A as in apple
> appl.
> apple
> Apple
> apples
> Appling
> apples to apples
> Adam's apple
> allergic apples
> alley apple
> apple allergy
> apple compote
> apple divider
> bad apple 

-- 
View this message in context: 
http://www.nabble.com/Result-order-is-different-from-I-expect-tp24113572p24121215.html
Sent from the Solr - User mailing list archive at Nabble.com.



Re: Result orde is different from I expect

2009-06-20 Thread akinori

Thanks,

The result of adding &debugQuery=true follows. Does this mean the order is
always defined from score? If that is the case, do I have to adjust the way
how solr calculate score? How can I do that?

I followed Otis's sugestion also and add &sort=word+asc but the first one is
not "apple", but "A as in apple"...

Best,

---

apple
apple
word:appl
word:appl
−

−


9.692953 = (MATCH) fieldWeight(word:appl in 3178), product of:
  1.0 = tf(termFreq(word:appl)=1)
  9.692953 = idf(docFreq=287, numDocs=1123433)
  1.0 = fieldNorm(field=word, doc=3178)

−


9.692953 = (MATCH) fieldWeight(word:appl in 76151), product of:
  1.0 = tf(termFreq(word:appl)=1)
  9.692953 = idf(docFreq=287, numDocs=1123433)
  1.0 = fieldNorm(field=word, doc=76151)

−


9.692953 = (MATCH) fieldWeight(word:appl in 156584), product of:
  1.0 = tf(termFreq(word:appl)=1)
  9.692953 = idf(docFreq=287, numDocs=1123433)
  1.0 = fieldNorm(field=word, doc=156584)

−


9.692953 = (MATCH) fieldWeight(word:appl in 156637), product of:
  1.0 = tf(termFreq(word:appl)=1)
  9.692953 = idf(docFreq=287, numDocs=1123433)
  1.0 = fieldNorm(field=word, doc=156637)

−


9.692953 = (MATCH) fieldWeight(word:appl in 156638), product of:
  1.0 = tf(termFreq(word:appl)=1)
  9.692953 = idf(docFreq=287, numDocs=1123433)
  1.0 = fieldNorm(field=word, doc=156638)

−


9.692953 = (MATCH) fieldWeight(word:appl in 156742), product of:
  1.0 = tf(termFreq(word:appl)=1)
  9.692953 = idf(docFreq=287, numDocs=1123433)
  1.0 = fieldNorm(field=word, doc=156742)

−


9.692953 = (MATCH) fieldWeight(word:appl in 157509), product of:
  1.0 = tf(termFreq(word:appl)=1)
  9.692953 = idf(docFreq=287, numDocs=1123433)
  1.0 = fieldNorm(field=word, doc=157509)

−


8.567441 = (MATCH) fieldWeight(word:appl in 156746), product of:
  1.4142135 = tf(termFreq(word:appl)=2)
  9.692953 = idf(docFreq=287, numDocs=1123433)
  0.625 = fieldNorm(field=word, doc=156746)

−


6.058096 = (MATCH) fieldWeight(word:appl in 97069), product of:
  1.0 = tf(termFreq(word:appl)=1)
  9.692953 = idf(docFreq=287, numDocs=1123433)
  0.625 = fieldNorm(field=word, doc=97069)

−


6.058096 = (MATCH) fieldWeight(word:appl in 123198), product of:
  1.0 = tf(termFreq(word:appl)=1)
  9.692953 = idf(docFreq=287, numDocs=1123433)
  0.625 = fieldNorm(field=word, doc=123198)


-


Erik Hatcher wrote:
> 
> Add &debugQuery=true and look at the enlightening scoring explanations.
> 
>   Erik
> 
> On Jun 19, 2009, at 11:23 AM, akinori wrote:
> 
>>
>> I am straggling with search result order of Solr.
>> I indexed a English-certain language dictionary to Solr.
>>
>> Then below is the result of query="apple" and I am confused with  
>> this. Why
>> doesn't "apple" come first and then Apple ?
>> I'd like to have your suggestion to fix this to more. I am really  
>> stressed
>> about this these days.
>> Any input is much appreciated.
>>
>> Thanks
>>
>> (example word list)
>> An apple!
>> A as in apple
>> appl.
>> apple
>> Apple
>> apples
>> Appling
>> apples to apples
>> Adam's apple
>> allergic apples
>> alley apple
>> apple allergy
>> apple compote
>> apple divider
>> bad apple
>>
>> (schema.xml)
>> 
>> 
>>
>> 
>>
>> 
>>  
>>
>>  
>>
>>
>>
>>> sortMissingLast="true"
>> omitNorms="true"/>
>>
>>
>>> sortMissingLast="true"
>> omitNorms="true"/>
>>
>>
>>
>>
>>
>>
>>
>>
>>> omitNorms="true"/>
>>
>> -- 
>> View this message in context:
>> http://www.nabble.com/Result-orde-is-different-from-I-expect-tp24113572p24113572.html
>> Sent from the Solr - User mailing list archive at Nabble.com.
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Result-order-is-different-from-I-expect-tp24113572p24124583.html
Sent from the Solr - User mailing list archive at Nabble.com.



Search for phrase including prepositions

2009-06-30 Thread akinori

I indexed English dictionary to solr.
When I search "apple juice" for example, solr understands the query is
"apple" & "juice" as what I want. Howerver, when I search "apple for", solr
thinks that the query is just "apple". 
How can I solve this? I think I have to understand the analyzer. Could
anyone navigate me?

Akinori
-- 
View this message in context: 
http://www.nabble.com/Search-for-phrase-including-prepositions-tp24275909p24275909.html
Sent from the Solr - User mailing list archive at Nabble.com.




Re: Search for phrase including prepositions

2009-06-30 Thread akinori

Ludwig,

Thank you for your prompt answer and I could solve the issue.

Then I have another question.
When I search "make for", solr returns words include both "make" and "for",
but when I type more than 3 words such as "in order to", the result becomes
0 though the index is sure to have several words including 3 of the words. 2
words are ok but more than 3 words resulted zero. Why is happens?

Best,




Michael Ludwig-4 wrote:
> 
> akinori schrieb:
>> I indexed English dictionary to solr.
>> When I search "apple juice" for example, solr understands the query is
>> "apple" & "juice" as what I want. Howerver, when I search "apple for",
>> solr thinks that the query is just "apple".
>> How can I solve this? I think I have to understand the analyzer.
> 
> Exactly.
> 
>> Could anyone navigate me?
> 
> Go to your analysis page, enter your field name (or type), check
> "verbose output", enter your query, and press "Analyze".
> 
> http://localhost:8983/solr/admin/analysis.jsp
> 
> You'll probably find that the word "for" is removed as a so-called
> stopword.
> 
> Michael Ludwig
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Search-for-phrase-including-prepositions-tp24275909p24276312.html
Sent from the Solr - User mailing list archive at Nabble.com.