| Subject: | Question about QueryParser |
|---|---|
| From: | "James liu" |
| Date: | Thu, 23 Oct 2008 20:30:05 +0800 |
public class AnalyzerTest {
@Test
public void test() throws ParseException {
QueryParser parser = new MultiFieldQueryParser(new String[]{"title",
"body"}, new StandardAnalyzer());
Query query1 = parser.parse("中文");
Query query2 = parser.parse("中 文");
System.out.println(query1);
System.out.println(query2);
}
}
output :
title:"中 文" body:"中 文"
(title:中 body:中) (title:文 body:文)
why they not same?
--
regards
j.L
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: Multisearcher will maintain index order sorting?, Ganesh |
|---|---|
| Next by Date: | Combining keyword queries with database-style queries, Niels Ott |
| Previous by Thread: | How to use regexQuery along with fuzzy logic capabilities, Agrawal, Aashish \(IT\) |
| Next by Thread: | Re: Question about QueryParser, Erick Erickson |
| Indexes: | [Date] [Thread] [Top] [All Lists] |