lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From L Duperval <duper...@videotron.com>
Subject Partial matching with spaces
Date Tue, 10 Aug 2010 19:40:31 GMT
I am using Compass which uses Lucene 2.4.1.

We are trying to implement "find as you type" searching. So for example, if I
have documents containing the following:

Newfoundland
New Mexico
New York
New Yorkshire

If a user types "New" all four documents are returned. When the user adds a
space, only the last three are returned. After typing "Y" the last two show up,
and so on.

It works, as long as there isn't a space in the query. Once there is a space,
nothing matches until the "k" in "New York" is added. And then, only "New York"
is returned, "New Yorkshire" isn't. 

Is there a way to do this with Lucene? If so, then I can try to make it work
similarly in Compass.

Thanks,

L


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message