about analyzer for searching location

2010-04-15 Thread Ian.huang
Hi All, I am implementing a search function for address by hibernate search which is based on lucene. The class definition as following: @Indexed public class Address implements Cloneable { @DocumentId private int id; @Field private String addrCountry; private String addrDesc; @Field private Str

Re: about analyzer for searching location

2010-04-19 Thread Ian.huang
lt;http://lucene.apache.org/java/2_9_0/api/core/org/apache/lucene/search/PhraseQuery.html>. If you are using parse() method of QueryParser. Enclose the searched string in extra double quotes, which must obviously be escaped. Query q = qp.parse("\"united states\""); 2