regarding range search

2007-06-11 Thread Mohammad Norouzi
Hello consider a query like this patientResult:[8 TO 9] this returns correct documents but patientResult:[8 TO 10] return nothing. and also this range [0.1 TO 10] returns results like 11, 10.8, 10.9 etc. is there any tricky way or workaround to obtain correct results? I know lucene compares

Re: "Contains" query parsed to PrefixQuery

2007-06-11 Thread Antony Bowesman
It's a bug in 2.1, fixed by Doron Cohen http://issues.apache.org/jira/browse/LUCENE-813 Antony dontspamterry wrote: Hi all, I was experimenting with queries using wildcard on an untokenized field and noticed that a query with both a starting and trailing wildcard, e.g. *abc*, gets parsed to

Re: Lucene out of the box

2007-06-11 Thread Chris Hostetter
: What I miss is a category for projects that provide add-ons, tools, or other : value to lucene (e.g. Luke is a cool Tool, very useful. It is listed at : contributions but not on the wiki PowerdBy site). Should I create an account and : simply add such a category? sounds like a good plan to me.

(this mail have My code!)Why use RMI search very slow! when have 13 TermQuery! Return cost 7500 ms .

2007-06-11 Thread 童小军
I am use RMI search two server date! When I use one TermQuery return 30ms (very good)! But when I use booleanQuery add tow termQuery return must 150 ms :( And three is 250 ms? My query have 13 TermQuery! Return cost 7500 ms . How can I do it quick! Use ICE(Internet Communications Engine) ZeroC

Why use RMI search very slow! when have 13 TermQuery! Return cost 7500 ms .

2007-06-11 Thread 童小军
I am use RMI search two server date! When I use one TermQuery return 30ms (very good)! But when I use booleanQuery add tow termQuery return must 150 ms :( And three is 250 ms? My query have 13 TermQuery! Return cost 7500 ms . How can I do it quick! Use ICE(Internet Communications Engine) ZeroC

Re: "Contains" query parsed to PrefixQuery

2007-06-11 Thread dontspamterry
Here you go: import junit.framework.TestCase; import org.apache.lucene.analysis.WhitespaceAnalyzer; import org.apache.lucene.queryParser.QueryParser; import org.apache.lucene.search.PrefixQuery; import org.apache.lucene.search.Query; import org.apache.lucene.search.WildcardQuery; public class W

Re: Lucene & MySq

2007-06-11 Thread Lindsey Hess
Thank you Erick Erickson and Chris Lu. I'm trying DBSight right now, and I'll let the group know if I have any issues. Cheers, Lindsey Erick Erickson <[EMAIL PROTECTED]> wrote: Understand that Lucene is an indexing engine. "out of the box", there's no understanding of databases etc

Re: "Contains" query parsed to PrefixQuery

2007-06-11 Thread Chris Hostetter
: I'm using 2.1.0 and I'm calling setAllowLeadingWildcard(true) first on my : QueryParser instance. I'm using a PerFieldAnalyzerWrapper where the field of : interest uses the WhiteSpaceAnalyzer. could you send some code demonstrating the probelm you areseeing? ideally in the form of a small self

Re: "Contains" query parsed to PrefixQuery

2007-06-11 Thread dontspamterry
I'm using 2.1.0 and I'm calling setAllowLeadingWildcard(true) first on my QueryParser instance. I'm using a PerFieldAnalyzerWrapper where the field of interest uses the WhiteSpaceAnalyzer. -Terry hossman_lucene wrote: > > > : gets parsed to the PrefixQuery *abc. I did enable the leading wildc

Re: "Contains" query parsed to PrefixQuery

2007-06-11 Thread Chris Hostetter
: gets parsed to the PrefixQuery *abc. I did enable the leading wildcard in : the QueryParser to allow the query above to be parsed so I'm wondering is are you sure you called setAllowLeadingWildcard(true) first? Are you using using 1.9 or earlier ... if so are you calling the static parse(Strin

"Contains" query parsed to PrefixQuery

2007-06-11 Thread dontspamterry
Hi all, I was experimenting with queries using wildcard on an untokenized field and noticed that a query with both a starting and trailing wildcard, e.g. *abc*, gets parsed to the PrefixQuery *abc. I did enable the leading wildcard in the QueryParser to allow the query above to be parsed so I'm w

Re: Retrieving TermVectors from a Field over the full index?

2007-06-11 Thread Benjamin Pasero
Ah, I see. The code was not very obvious to behave like that :) Btw my usecase is to simply display the mostfrequent keywords in a UI (you could call it a Tag-Cloud). Regards, Ben No, the code I posted is not doing nearly as much work. Try it. TermEnum te = this.reader.terms(); te.s

Re: Lucene out of the box

2007-06-11 Thread Joerg Hohwiller
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi Eric, > On Jun 10, 2007, at 5:05 PM, Joerg Hohwiller wrote: >> If you like it, I would be very pleased if you put a link at your >> contributions: >> >> http://lucene.apache.org/java/docs/contributions.html > > That page is basically deprecated (w

Re: Retrieving TermVectors from a Field over the full index?

2007-06-11 Thread Michael McCandless
"Chris Hostetter" <[EMAIL PROTECTED]> wrote: > > : It seems like what's missing is the efficient ability for > : TermDocs/TermInfosReader to seek to the first term of a given field. > : They already can seek to a given specific term; with some small > > isn't TermEnum.skipTo(new Term("field","")

Re: Retrieving TermVectors from a Field over the full index?

2007-06-11 Thread Chris Hostetter
: It seems like what's missing is the efficient ability for : TermDocs/TermInfosReader to seek to the first term of a given field. : They already can seek to a given specific term; with some small isn't TermEnum.skipTo(new Term("field","") followed by termDocs.seek(TermEnum) going to take care of

Re: Lucene out of the box

2007-06-11 Thread Erik Hatcher
On Jun 10, 2007, at 5:05 PM, Joerg Hohwiller wrote: If you like it, I would be very pleased if you put a link at your contributions: http://lucene.apache.org/java/docs/contributions.html That page is basically deprecated (we should add something to that effect). Please add your project t

Re: searching for empty field

2007-06-11 Thread Erik Hatcher
On Jun 11, 2007, at 9:53 AM, Dino wrote: Now my question is how will I search for all the documents with *empty* Field2? You can search for "-field2:[* TO *] AND *:*" essentially. With Solr, the *:* isn't needed, but is with pure Lucene to ensure a positive query also. Erik

Re: searching for empty field

2007-06-11 Thread Erick Erickson
You don't as far as I know. One solution that has been suggested is to always index field2, but with a noop value. This works pretty well if you choose a value you'd never search for, say xzxzxzxzxzxzxzx. Then you can search field2 for that special value to get the *empty* case. Best Erick On 6/

RE: searching for empty field

2007-06-11 Thread Mordo, Aviran (EXP N-NANNATEK)
AFAIK there is no strait way of doing that, however you can create another field (field4) which can indicate if field2 exists. HTH Aviran http://www.aviransplace.com http://shaveh.co.il -Original Message- From: Dino [mailto:[EMAIL PROTECTED] Sent: Monday, June 11, 2007 9:54 AM To: java

Re: Retrieving TermVectors from a Field over the full index?

2007-06-11 Thread Erick Erickson
No, the code I posted is not doing nearly as much work. Try it. TermEnum te = this.reader.terms(); te.skipTo(new Term("keyword", "")); *skips terms NOT in the keyword field. while (te.next()) { Term term = te.term(); if (! term.field().equals("ke

searching for empty field

2007-06-11 Thread Dino
Hi Everyone, I have a lucene index were I add a document with a set of metadata. In my system, all the fields in the metadata set needn't be there all the time for a given document. Say if I am expecting a metadata set like Field1:{yes|no} [Field2:{val_1[,val_2]... }] Fiel

How to view deleted documents and undelete(int docID)

2007-06-11 Thread Martin Kobele
Hi, I am wondering whether this is possible at all Regarding SegmentReader.document(n,..), an exception is thrown if (isDeleted(n) == true). So I cannot get a hold of document n if it is deleted. Despite that, is there a way to view the deleted document and undelete a single document? (Luk

Re: Retrieving TermVectors from a Field over the full index?

2007-06-11 Thread Grant Ingersoll
I am curious as to what you are going to do with this information. Is it strictly for display, or are you doing some sort of reranking algorithm? Having this insight may help us think of other ways to solve the problem. On Jun 9, 2007, at 11:19 AM, Benjamin Pasero wrote: Hi, I wonder i

Re: multi field search

2007-06-11 Thread karl wettin
11 jun 2007 kl. 07.48 skrev sagar khetkade: But if we dont want to search on field but on the whole document Is it MultiFieldQueryParser you are looking for?

Re: Retrieving TermVectors from a Field over the full index?

2007-06-11 Thread Michael McCandless
I see the issue. If your "keywords" field has a tiny set of terms (say 1000) vs the rest of your fields (say 1 million) then linear search is a very slow way to step through the terms for the field "keywords". It seems like what's missing is the efficient ability for TermDocs/TermInfosReader to

Re: Retrieving TermVectors from a Field over the full index?

2007-06-11 Thread Benjamin Pasero
This is what I coded up till now: TermEnum terms = reader.terms(); while (terms.next()) { String field = terms.term().field(); if ("keywords".equals(field)) keywords.put(terms.term().text(), terms.docFreq()); } Your solution is doing more or less the same right? Ben Maybe I'm missing th