RE: BooleanQuery

2006-12-06 Thread Renaud Waldura
Read my own complaints about QueryParser here: http://marc.theaimsgroup.com/?l=lucene-user&m=116069469827270&w=2 You're in for a surprise. As alluded by Erick, the stock QP doesn't quite do what one (legitimately IMO) expects. --Renaud -Original Message- From: Erick Erickson [mailto:[

Re: BooleanQuery

2006-12-06 Thread Erick Erickson
These are not boolean operators, which is often confusing. See the thread "*Another problem with the QueryParser*" for an exposition by Chris about how these operate. This may change what you expect to come back from the parser... If it doesn't, then maybe someone else can chime in ... Erick O

BooleanQuery

2006-12-06 Thread Marcelo Ohashi
Hi, Does anyone know if lucene can handle complex boolean queries like the following ones? 1. T: (A OR NOT B) 2. (T:A AND NOT T:B) OR NOT T:C Cause I figured out in some tests that the results were not really what I expected. Thanks in advance, _ Marcelo Ohashi

Re: Store a document-like map

2006-12-06 Thread Soeren Pekrul
If there would be a boost factor for a single keyword (term) at index time I would index a class as a document with the keys as keywords and values as boost factor. Unfortunately you can just boost documents and fields at index time. Single terms can only be boosted at search time (TermQuery.se

Re: Customized Analyzer

2006-12-06 Thread Grant Ingersoll
Grasping at straws... Did you by any chance set your default Operator in the query parser (QP) to be AND and you have no documents with both wind and window in them? Also, what if you write up a test case where you remove the QP from the equation and create the BooleanQuery described belo

Re: Customized Analyzer

2006-12-06 Thread Erick Erickson
Chris is asking you to post a program that *he* can compile and run that demonstrates the problem. So far, you've posted code that requires other parts of your system to be present in order to compile and run. That makes it hard to see the problem. For all we know, access.getProductsByKeyword(keyw

RE: Customized Analyzer

2006-12-06 Thread Alice
I'm using it. But the fact is that when my analyzer returns synonyms to the BooleanQuery I get not hit. But, when the analyzer returns no synonyms I get a hit. If I enter: "window". I get a TermQuery: contents:window and I get a hit. But If I enter: "wind". I get a BooleanQuery: contents:wind co

Re: Customized Analyzer

2006-12-06 Thread Grant Ingersoll
I often find that using Luke (google "luke lucene") gives me the info I need to figure out why I am not getting hits. So, if you haven't tried using it yet, I would suggest it. On Dec 6, 2006, at 7:38 AM, Alice wrote: Going through the javadocs, that’s wath I found out: About the position

Re: Snowball Analyzer

2006-12-06 Thread Erick Erickson
What behavior are you expecting? The point of stemming is exactly to make monkey equivalent to monkeys. Along with a series of other transformations. What are you trying to accomplish? Best Erick On 12/6/06, Aaron Shaw <[EMAIL PROTECTED]> wrote: Hi, I've got the snowball analyzer working and

Re: Search for null value or empty string in lucene

2006-12-06 Thread Erick Erickson
Perhaps the most straight-forward way would be to index a known unique value for each document that would have had a null entry. Conceptually, when a field would be null, index the value "nothinghere". Then you can just search on documents where the value is equal to "nothinghere". Alternatively,

RE: Customized Analyzer

2006-12-06 Thread Alice
Going through the javadocs, that’s wath I found out: About the positionIncrement of Token.class: " Set it (positionIncrement) to zero to put multiple terms in the same position. This is useful if, e.g., a word has multiple stems. Searches for phrases including either stem will match. In this c

Snowball Analyzer

2006-12-06 Thread Aaron Shaw
Hi, I've got the snowball analyzer working and it returns my records, however stemming doesn't seem to really do much. It returns plurals (so if i enter "monkey" as my search term and the word "monkeys" is in the document, it will be returned) but nothing more than that. Is that the extent of the

Search for null value or empty string in lucene

2006-12-06 Thread Supriya Kumar Shyamal
Hi, I have some question regarding the search. In a document we can have several fields but not all fields have the value in all documents i.e. some fields in a document can have null or empty string. But how to search for a null field value in a document using the IndexSearcher? Any idea wil

RE: Customized Analyzer

2006-12-06 Thread Alice
I'm sorry, I'm not sure about what you're asking me to post, anyway here is my junit test: protected void setUp() throws Exception { super.setUp(); access = ServiceLocator.getAccess(); } public void testSearch() throws Exception { String keyword = "wi