Re: Lucene Query Parser Special Characters

2016-10-14 Thread Ashley Ryan
The documentation I'm referencing is here: https://lucene.apache.org/core/4_5_1/queryparser/org/apache/lucene/queryparser/classic/package-summary.html#package_description, with a note: org.apache.lucene.queryparser.flexible.standard

Re: Lucene Query Parser Special Characters

2016-10-13 Thread Trejkaz
On Fri, Oct 14, 2016 at 2:47 AM, Ashley Ryan wrote: > Obviously, our work around of escaping the angle brackets works as we need > it to, but it seems to me that your documentation is incorrect. Am I > misunderstanding the documentation or conflating the issue I'm seeing with > the topic of specia

Re: Lucene Query Parser

2011-11-28 Thread Ian Lea
Just use one of the search() methods that does sorting and specify an array of sort fields with SortField.SCORE first, then your name fields. But be aware that complex real world textual queries and docs rarely produce identical scores. You could post-process the results and group them into "good

Re: lucene query parser for double-worded term query

2008-06-24 Thread Chris Lu
Erick, Thanks! It's the analyzer problem. I should have used the same analyzer, KeywordAnalyzer, to create the query parser. Thanks a lot! -- Chris Lu - Instant Scalable Full-Text Search On Any Database/Application site: http://www.dbsight.net demo: http://search.dbsight

Re: lucene query parser for double-worded term query

2008-06-24 Thread Erick Erickson
What analyzers are you using for both indexing and querying? Have you looked at your index with Luke to see what's actually in the index? The reason I'm asking is I'm wondering whether you are having capitalization issues. That is, your index analyzer lower cases the tokens and your query analyzer

Re: lucene query parser for double-worded term query

2008-06-24 Thread Chris Lu
Yonik, Thanks for your quick reply! But I found after backslash escape spaces, both tags:San\ Francisco tags:"San\ Francisco" turns into PhraseQuery, just like tags:"San Francisco", still no results returned. Maybe Lucene Query Parser does not handle this case? -- Chris Lu -

Re: lucene query parser for double-worded term query

2008-06-24 Thread Yonik Seeley
You can backslash escape spaces, so these should both work: tags:San\ Francisco tags:"San\ Francisco" -Yonik On Tue, Jun 24, 2008 at 8:14 PM, Chris Lu <[EMAIL PROTECTED]> wrote: > I have a tags field. And each tag can have multiple words, like "San > Francisco". Each tag is analyzed into Keyword