Re: Sort by relevance+distance

2005-09-17 Thread James Huang
I use a custom collector: class ResultCollector extends HitCollector { SortedSet set = new TreeSet(); IndexSearcher searcher; Location me; ResultCollector(IndexSearcher searcher, Location me) { this.me = me; this.searcher = searcher; } public void collect(int id, float scor

Re: Sort by relevance+distance

2005-09-17 Thread Erik Hatcher
On Sep 17, 2005, at 4:10 PM, James Huang wrote: Hi, I can sort the search results by distance now. But, the relevance is lost. I like to have the results sorted by relevance + distance, i.e., relevance first; for results of similar relevance, order by distance. How to do that? How are you c

Re: Sort by relevance+distance

2005-09-17 Thread James Huang
I guess I can use HitCollector and implement my own sorting, right? Is there a better approach? --- James Huang <[EMAIL PROTECTED]> wrote: > Hi, > > I can sort the search results by distance now. But, > the relevance is lost. > > I like to have the results sorted by relevance + > distance, i.e

Sort by relevance+distance

2005-09-17 Thread James Huang
Hi, I can sort the search results by distance now. But, the relevance is lost. I like to have the results sorted by relevance + distance, i.e., relevance first; for results of similar relevance, order by distance. How to do that? Thanks a lot in advance! -James --- James Huang <[EMAIL PROTECTE

Re: Lucene database bindings

2005-09-17 Thread markharw00d
>>Basically your lucene_query function will return a true/false in one of the query predicates for each record. Almost, it returns a score - much more useful than just a boolean and the key difference between a search engine and a database (partial matching with relevance ranked scores). Thes

Re: Stopping Duplicates

2005-09-17 Thread Jeff Rodenburg
Ben - I can think of two ways to achieve this. 1) While adding your information to the index, query the index for an existing record. If you get no match, add the record. 2) Control the exclusivity requirement from your data source, so that no duplicate records ever have the opportunity to be i

Re: Lucene database bindings

2005-09-17 Thread Mag Gam
Mark: VERY VERY good post! Please publish this doc and example. On 9/17/05, Chris Lu <[EMAIL PROTECTED]> wrote: > > On 9/17/05, markharw00d <[EMAIL PROTECTED]> wrote: > > Mag Gam wrote: > > > > >Does your example store the index in the derby db or somewhere else? I > was > > >thinking of index

Re: Lucene database bindings

2005-09-17 Thread Chris Lu
On 9/17/05, markharw00d <[EMAIL PROTECTED]> wrote: > Mag Gam wrote: > > >Does your example store the index in the derby db or somewhere else? I was > >thinking of indexing a table in a seperate column. > > > > > The software is not an org.apache.lucene.store.Directory implementation > ie an FSDire

Re: Lucene database bindings

2005-09-17 Thread markharw00d
Mag Gam wrote: Does your example store the index in the derby db or somewhere else? I was thinking of indexing a table in a seperate column. The software is not an org.apache.lucene.store.Directory implementation ie an FSDirectory alternative for persisting Lucene data in a relational table

Re: Lucene database bindings

2005-09-17 Thread Mag Gam
Does your example store the index in the derby db or somewhere else? I was thinking of indexing a table in a seperate column. On 9/16/05, markharw00d <[EMAIL PROTECTED]> wrote: > > I know there have been some posts discussing how to integrate Lucene > with Derby recently. > > I've added an ex

Re: Lucene database bindings

2005-09-17 Thread Mag Gam
Mark: Thanks for looking at this.I will try it out! On 9/16/05, markharw00d <[EMAIL PROTECTED]> wrote: > > I know there have been some posts discussing how to integrate Lucene > with Derby recently. > > I've added an example project that works with both HSQLDB and Derby > here: http://issues.a

Re: query with wildcard in field name?

2005-09-17 Thread Robert Koberg
I wrote: (is svn.apache.org down? I can't seem to connect to the repository server to get the latest source.) It is up now... - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

query with wildcard in field name?

2005-09-17 Thread Robert Koberg
Hi, Is there a Query that will allow wildcards in the field name? For example, lets say I have documents with the following fields: Field Name = Field Value - Doc 1 /faq/question/a = foo - Doc 2 /article/section/p/a = foo Is there a way to build a query like: QueryParser.parse( "foo",

Stopping Duplicates

2005-09-17 Thread Ben Gill
Hi, I am storing names in my index, and am currently getting duplicates back (quite correctly, on Lucene's part), because I am storing: id name 1 fred 2 fred What I want to happen is, if a duplicate name is added to the index, I only ever want one entity to exist with the name

Re: Text is not indexed when passed as a StringReader

2005-09-17 Thread Andrzej Bialecki
Daniel Naber wrote: On Friday 16 September 2005 21:51, Matthias Bräuer wrote: but unstored field and the passed in Reader happens to be a StringReader (e.g. when extracting Word documents using the Textmining library) the field is not indexed at all. That means Luke shows no terms for this fie