You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@lucene.apache.org by fell <na...@tcs.com> on 2009/01/16 11:47:51 UTC

Basic question on Lucene search results

Hi all,

I am new to Lucene and I need to know the following:

In case I have indexed some data using Lucene and it contains the fields:
Location, City, Country.

Suppose the data is as follows in the index in each of the above fields:
1) R G Heights
2) London
3) United Kindom

If i try to search the index by putting the following in my query : 
1) RG Heights (Please not R and G do not have space in the middle) or 
2) RGHeights. (no space at all) or  
3) R  G      Heights. (extra space between tokens), 
4) Kingdom United.

Please tell me if lucene would come up with a positive result or would it
tell me 'no hits'.

Please let me know this for each of the queries above!

Thanks!
-- 
View this message in context: http://www.nabble.com/Basic-question-on-Lucene-search-results-tp21496813p21496813.html
Sent from the Lucene - General mailing list archive at Nabble.com.


Re: Basic question on Lucene search results

Posted by Chris Hostetter <ho...@fucit.org>.
: I am new to Lucene and I need to know the following:

Lucene means many things to many people.  s a project, Lucene has several 
subprojects which may be of use to you...

	http://lucene.apache.org/#What+Is+Lucene%3F

..it's not clear from your question what sub project you are asking about
(are you writing your own java application using the lucene library?, are 
you using Solr?, are you using Nutch?) and the answer is going to be 
differnet based on what you are using.

for eaxample: Solr has a WordDelimiterFilter that would make this very 
easy.  you could also use that Filter in your own java appliication with a 
little bit of work, and using it in nutch might also be possible if you 
have some java experience -- using it in Lucene.net would require you to 
port it ... in a nutshell: yes the types of queries you are interested in 
can be dealt with, it's just a question of how.


My suggestion would be to take a look at the various subprojects, figure 
out which fits your usecase hte best, and then followup on the user list 
for that subproject if you have any difficulties getting yourqueries to 
work the way you want.


: In case I have indexed some data using Lucene and it contains the fields:
: Location, City, Country.
: 
: Suppose the data is as follows in the index in each of the above fields:
: 1) R G Heights
: 2) London
: 3) United Kindom
: 
: If i try to search the index by putting the following in my query : 
: 1) RG Heights (Please not R and G do not have space in the middle) or 
: 2) RGHeights. (no space at all) or  
: 3) R  G      Heights. (extra space between tokens), 
: 4) Kingdom United.
: 
: Please tell me if lucene would come up with a positive result or would it
: tell me 'no hits'.
: 
: Please let me know this for each of the queries above!


-Hoss