Re: Optional Terms in a single query

2005-02-21 Thread Todd VanderVeen
Luke Shannon wrote: Hi Tod; Thanks for your help. I was able to do what you said but in a much uglier way using a Boolean Query and adding Wildcard Queries. The end result looks like this: The query: +(type:138) +((-name:*tim* -name:*bill* -name:*harry* +olfaithfull:stillhere)) But this one works a

Re: Optional Terms in a single query

2005-02-21 Thread Luke Shannon
Hi Tod; Thanks for your help. I was able to do what you said but in a much uglier way using a Boolean Query and adding Wildcard Queries. The end result looks like this: The query: +(type:138) +((-name:*tim* -name:*bill* -name:*harry* +olfaithfull:stillhere)) But this one works as expected. Th

Re: Optional Terms in a single query

2005-02-21 Thread Todd VanderVeen
Luke Shannon wrote: The API I'm working with combines a series of queries into one larger one using a boolean query. Queries on the same field get OR's into one big query. All remaining queries are AND'd with this big one. Working with in this system I have: arg = (mario luigi bobby joe) //i do hav

Re: Optional Terms in a single query

2005-02-21 Thread Luke Shannon
The API I'm working with combines a series of queries into one larger one using a boolean query. Queries on the same field get OR's into one big query. All remaining queries are AND'd with this big one. Working with in this system I have: arg = (mario luigi bobby joe) //i do have control of how

Re: Optional Terms in a single query

2005-02-21 Thread Luke Shannon
Sorry about the typos. What I would like is a document with a type field = 181, olfaithfull=stillHere and a name field not containing tim, bill or harry. Thanks, Luke - Original Message - From: "Paul Elschot" <[EMAIL PROTECTED]> To: Sent: Monday, February 21, 2005 5:31 PM Subject: Re:

Re: Optional Terms in a single query

2005-02-21 Thread Todd VanderVeen
Luke Shannon wrote: Hi; I'm trying to create a query that look for a field containing type:181 and name doesn't contain tim, bill or harry. +(type: 181) +((-name: tim -name:bill -name:harry +oldfaith:stillHere)) +(type: 181) +((-name: tim OR bill OR harry +oldfaith:stillHere)) +(type: 181) +((-name

Re: Optional Terms in a single query

2005-02-21 Thread Paul Elschot
On Monday 21 February 2005 23:23, Luke Shannon wrote: > Hi; > > I'm trying to create a query that look for a field containing type:181 and > name doesn't contain tim, bill or harry. type: 181 -(name: tim name:bill name:harry) > +(type: 181) +((-name: tim -name:bill -name:harry +oldfaith:stillHe

Optional Terms in a single query

2005-02-21 Thread Luke Shannon
Hi; I'm trying to create a query that look for a field containing type:181 and name doesn't contain tim, bill or harry. +(type: 181) +((-name: tim -name:bill -name:harry +oldfaith:stillHere)) +(type: 181) +((-name: tim OR bill OR harry +oldfaith:stillHere)) +(type: 181) +((-name:*(tim bill harry)

Re: More Analyzer Question

2005-02-21 Thread Erik Hatcher
The problem is your KeywordSynonymAnalyzer is not truly a "keyword" analyzer in that it is tokenizing the field into parts. So Document 1 has [test] and [mario] as tokens that come from the LowerCaseTokenizer. Look at Lucene's svn repository under contrib/analyzers and you'll see a KeywordToke

Re: Query Tuning

2005-02-21 Thread Paul Elschot
On Monday 21 February 2005 20:43, Todd VanderVeen wrote: > Runde, Kevin wrote: > > >Hi All, > > > >How does Lucene handle multi term queries? Does it use short circuiting? > >So if a user entered: > >(a OR b) AND c > >But my program knew testing for "c" is cheaper than testing for "(a OR > >b)" an

Re: knowing which field contributed the search result

2005-02-21 Thread David Spencer
John Wang wrote: Anyone has any thoughts on this? Does this help? http://jakarta.apache.org/lucene/docs/api/org/apache/lucene/search/Searchable.html#explain(org.apache.lucene.search.Query,%20int) Thanks -John On Wed, 16 Feb 2005 14:39:52 -0800, John Wang <[EMAIL PROTECTED]> wrote: Hi: Is there wa

Re: Handling Synonyms

2005-02-21 Thread David Spencer
Luke Shannon wrote: Hello; Does anyone see a problem with the following approach? No, no problem with it and it's in fact what my "Wordnet Query Expansion" sandbox module does. The nice thing about Lucene is you at least have the option of doing things the other way - you can write a custom Anal

Re: knowing which field contributed the search result

2005-02-21 Thread John Wang
Anyone has any thoughts on this? Thanks -John On Wed, 16 Feb 2005 14:39:52 -0800, John Wang <[EMAIL PROTECTED]> wrote: > Hi: > >Is there way to find out given a hit from a search, find out which > fields contributed to the hit? > > e.g. > > If my search for: > > contents1="brown fox" OR

Re: Query Tuning

2005-02-21 Thread Todd VanderVeen
Runde, Kevin wrote: Hi All, How does Lucene handle multi term queries? Does it use short circuiting? So if a user entered: (a OR b) AND c But my program knew testing for "c" is cheaper than testing for "(a OR b)" and I rewrote the query as: c AND (a OR b) Would the query run faster? Sorry if this h

Re: Query Tuning

2005-02-21 Thread Paul Elschot
On Monday 21 February 2005 19:59, Runde, Kevin wrote: > Hi All, > > How does Lucene handle multi term queries? Does it use short circuiting? > So if a user entered: > (a OR b) AND c > But my program knew testing for "c" is cheaper than testing for "(a OR > b)" and I rewrote the query as: > c AND (

Query Tuning

2005-02-21 Thread Runde, Kevin
Hi All, How does Lucene handle multi term queries? Does it use short circuiting? So if a user entered: (a OR b) AND c But my program knew testing for "c" is cheaper than testing for "(a OR b)" and I rewrote the query as: c AND (a OR b) Would the query run faster? Sorry if this has already be answ

RE: Using the highlighter from the sandbox with a prefix query.

2005-02-21 Thread Michael Celona
Thank you this helped a lot... Michael Celona -Original Message- From: Erik Hatcher [mailto:[EMAIL PROTECTED] Sent: Monday, February 21, 2005 11:55 AM To: Lucene Users List Subject: Re: Using the highlighter from the sandbox with a prefix query. On Feb 21, 2005, at 10:53 AM, Michae

RE: Using the highlighter from the sandbox with a prefix query.

2005-02-21 Thread mark harwood
>One thing to mention > that I am using a > MultiSearcher to rewrite the queries. I tried... Ah. I remember this got a little ugly. The highlighter has a Junit test that demonstrates highlighting fuzzy queries when using a multisearcher. Take a look at that. I can't remember the ins and outs of t

Re: Using the highlighter from the sandbox with a prefix query.

2005-02-21 Thread Erik Hatcher
On Feb 21, 2005, at 10:53 AM, Michael Celona wrote: That the only stack I get. One thing to mention that I am using a MultiSearcher to rewrite the queries. I tried... query = searcher_last.rewrite( query ); query = searcher_cur.rewrite( query ); using IndexSearcher and I don't get an error... Howe

Handling Synonyms

2005-02-21 Thread Luke Shannon
Hello; Does anyone see a problem with the following approach? For synonyms, rather than putting them in the index, I put the original term and all the synonyms in the query. Every time I create a query, I check if the term has any synonyms. If it does, I create Boolean Query OR'ing one Query obj

Re: Iterate through all the document ids in the index?

2005-02-21 Thread Doug Cutting
William Lee wrote: is there a simple and fast way to get a list of document IDs through the lucene index? I can use a loop to iterate from 0 to IndexReader.maxDoc and check whether an the document id is valid through IndexReader.document(i), but this would imply that I have to retrieve the docum

RE: Using the highlighter from the sandbox with a prefix query.

2005-02-21 Thread Michael Celona
That the only stack I get. One thing to mention that I am using a MultiSearcher to rewrite the queries. I tried... query = searcher_last.rewrite( query ); query = searcher_cur.rewrite( query ); using IndexSearcher and I don't get an error... However, I not able to highlight wildcard queries. Mi

Sorting isn't working for my date field

2005-02-21 Thread Ben
Hi Do I need to store and index the field I want to sort? Currently I am only indexing the field without storing nor tokenizing it. I have a date field indexing as MMdd and I have two documents with the same date. When I do my search with: searcher.search(query, new SortField("date", true));

Re: Using the highlighter from the sandbox with a prefix query.

2005-02-21 Thread Erik Hatcher
On Feb 21, 2005, at 10:20 AM, Michael Celona wrote: I am using query = searcher.rewrite( query ); and it is throwing java.lang.UnsupportedOperationException . Am I able to use the searcher rewrite method like this? What's the full stack trace? Erik --

RE: Using the highlighter from the sandbox with a prefix query.

2005-02-21 Thread Michael Celona
I am using query = searcher.rewrite( query ); and it is throwing java.lang.UnsupportedOperationException . Am I able to use the searcher rewrite method like this? Thanks, Michael -Original Message- From: Daniel Naber [mailto:[EMAIL PROTECTED] Sent: Thursday, February 17, 2005 4

Fwd: lucene.apache.org problems again

2005-02-21 Thread Erik Hatcher
Looks like the issue has been resolved with the lucene.apache.org DNS. Erik Begin forwarded message: From: Ask Bjørn Hansen <[EMAIL PROTECTED]> Date: February 20, 2005 9:34:50 PM EST To: "Noel J. Bergman" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]>, "Erik Hatcher" <[EMAIL PROTECTED]> Subjec