Re: Lucene 2.9.0 leaves too many .cfs files open, causing too many files open java error.

2009-10-19 Thread Grant Ingersoll


On Oct 18, 2009, at 1:47 PM, GlenAbbeyDrive wrote:



I commit the IndexWriter every 200 documents in a batch as follows  
and you

can see that I reopened the reader after the commit.

private void commit(IndexWriter writer) throws CorruptIndexException {
writer.commit();
if(indexReader!=null)
indexReader.reopen();
}


You should be checking if the reader returned by reopen() is different  
than the one you have and then if it is, you need to close the old one  
at the appropriate time.


-Grant


--
Grant Ingersoll
http://www.lucidimagination.com/

Search the Lucene ecosystem (Lucene/Solr/Nutch/Mahout/Tika/Droids)  
using Solr/Lucene:

http://www.lucidimagination.com/search


-
To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-user-h...@lucene.apache.org



RE: How to make each term of query appear in at least one field of multiple field query

2009-10-19 Thread Steven A Rowe
Hi Rich,

On 10/17/2009 at 4:24 PM, Rich Livingstone wrote:
> I am a bit stumped by how to ensure that, where there are multiple
> terms in my query, that each term must appear at least once across
> all specified fields of my document.

You can create a MUST clause for each term, with a boosted SHOULD term query 
for each field, e.g.:

+(field1:term1^field1boost field2:term1^field2boost ...)
+(field1:term2^field1boost field2:term2^field2boost ...)
...

Steve


-
To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-user-h...@lucene.apache.org



Re: JDBC access to a Lucene index

2009-10-19 Thread Marcelo Ochoa
Hi Zukka:
   This is similar approach to Lucene Domain Index:
http://docs.google.com/Doc?id=ddgw7sjp_54fgj9kg
But Lucene Domain Index is an specific implementation for Oracle
Databases 10g/11g which is integrated through the ODCI API and
replacing the Lucene file system storage by a BLOB storage.
Basically you defines Index on table columns and then query Lucene
Index by using a new operator:
   lcontains(col,lucene-query,op)
two new ancillary operators:
   lscore(op)
   lhighlight(op)
and some pipeline functions which provides highlighting, facets, and so on.
But isn't a new JDBC driver implementation, you query Lucene
Domain Index using default Oracle's JDBC drivers.
Best regards, Marcelo.
On Sat, Oct 17, 2009 at 4:59 AM, Jukka Zitting  wrote:
> Hi,
>
> On Fri, Oct 16, 2009 at 9:12 PM, Grant Ingersoll  wrote:
>> I'm not aware of any, but you might get more mileage asking on java-user.
>
> You're right, poor original choice of list from me.
>
> java-users@, here's my question from java-dev@:
>
> Some while ago I implemented a simple JDBC to JCR bridge [1] that
> allows one to query a JCR repository from any JDBC client, most
> notably various reporting tools.
>
> Now I'm wondering if something similar already exists for a normal
> Lucene index. Something that would treat your entire index as one huge
> table (or perhaps a set of tables based on some document type field)
> and would allow you to use simple SQL SELECTs to query data.
>
> Any pointers would be welcome. If this hasn't already been done, would
> there be interest in such a JDBC driver for Lucene?
>
> [1] http://dev.day.com/microsling/content/blogs/main/jdbc2jcr.html
>
> BR,
>
> Jukka Zitting
>
> -
> To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
> For additional commands, e-mail: java-user-h...@lucene.apache.org
>
>



-- 
Marcelo F. Ochoa
http://marceloochoa.blogspot.com/
http://marcelo.ochoa.googlepages.com/home
__
Want to integrate Lucene and Oracle?
http://marceloochoa.blogspot.com/2007/09/running-lucene-inside-your-oracle-jvm.html
Is Oracle 11g REST ready?
http://marceloochoa.blogspot.com/2008/02/is-oracle-11g-rest-ready.html

-
To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-user-h...@lucene.apache.org



RE: How to make each term of query appear in at least one field of multiple field query

2009-10-19 Thread Rich Livingstone

Good idea, Steve, thanks for that. It could end up being a very large query,
though, and my search is even more complicated by the fact I have to do
synonym expansion on the search too so

+(field1:term1^field1boost field2:term1^field2boost ...)
+(field1:term2^field1boost field2:term2^field2boost ...)

could turn into

+(field1:term1^field1boost field1:term1synonym1^field1boost
term1synonym2^field1boost  field2:term1^field2boost ...)
...

I thought about doing the expansion at indexing time but that makes it less
dynamic as changes require a reindexing and this is driving an ecommerce
website which might not take kindly to search downtime too often.

The javadocs for MultiFieldQueryParser also suggest that using this class by
creating an object & then calling parse, rather than using
MultiFieldQueryParser.parse which is what I do, could achieve the same
effect. At the moment I'm sort of working round this by doing 2 queries, one
on a concatenated field which determines the valid set of hits and doing a
union of that with a search that actually takes into account weightings
properly. Seems to work but 2 searches is obviously not so good !

I'll give it a whirl and post my results.


Steven A Rowe wrote:
> 
> Hi Rich,
> 
> On 10/17/2009 at 4:24 PM, Rich Livingstone wrote:
>> I am a bit stumped by how to ensure that, where there are multiple
>> terms in my query, that each term must appear at least once across
>> all specified fields of my document.
> 
> You can create a MUST clause for each term, with a boosted SHOULD term
> query for each field, e.g.:
> 
> +(field1:term1^field1boost field2:term1^field2boost ...)
> +(field1:term2^field1boost field2:term2^field2boost ...)
> ...
> 
> Steve
> 
> 
> -
> To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
> For additional commands, e-mail: java-user-h...@lucene.apache.org
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/How-to-make-each-term-of-query-appear-in-at-least-one-field-of-multiple-field-query-tp25941499p25970508.html
Sent from the Lucene - Java Users mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-user-h...@lucene.apache.org