I didn't see the demo codes. You should look into the
indexDocs(IndexWriter,File) function to see if it stores these kinds of
contents.
On 7/6/06, Sarvadnya Mutalik <[EMAIL PROTECTED]> wrote:
I'm using the indexing technique as illustrated in the example provided
by Lucene 2.0. (as in demo ==>
My two bits...
If you consider (say) the 2nd pass of the loop...
Searcher searcher = null;
for(int i = 0; i < 5; ++i){
RAMDirectory ramdir = new RAMDirectory( db );
// <- Consider this moment
searcher = n
I'm using the indexing technique as illustrated in the example provided
by Lucene 2.0. (as in demo ==> IndexFiles.java)
The Indexing the method is as bellow
static void indexDocs(IndexWriter writer, File file) throws
IOException {
// do not try to index files that cannot be read
i
How you index "doctitle" and "summary".
The Store parameter must be "COMPRESS" or "YES"
On 7/6/06, Sarvadnya Mutalik <[EMAIL PROTECTED]> wrote:
Hi, I'm using Lucene 2.0, latest ver of Apache Lucene search engine.
After successfully indexing, when I tried to search, I'm not able to get
the compl
Hi, I'm using Lucene 2.0, latest ver of Apache Lucene search engine.
After successfully indexing, when I tried to search, I'm not able to get
the complete information.
In the following code snippet, I'm getting the values for "doctitle"
and "summary" as null.
While it says there are two results.
import org.apache.lucene.search.Searcher;
import org.apache.lucene.search.IndexSearcher;
import org.apache.lucene.search.*;
import org.apache.lucene.index.*;
import org.apache.lucene.store.RAMDirectory;
/**
* Index is ~100mb.
* Run with -Xmx256m on Windows XP
*
* OutOfMemoryException encounter
The mailing list server doesn't allow most attachments (i think the magic
incantation is to make sure your mail client indicates that the
attachments are plain text -- not some fancy type like text/x-java-source
or application/x-java)
try including it inline in your email.
: Date: Wed, 5 Jul 2
Thanks for the fast response -- you're right, I had a typo in the code snippet.
I've attached the test code that reproduces the OutOfMemoryException.
The code is a simple main method that repeatedly opens/searches/closes
an index using RAMDirectory. Maybe there's something I'm overlooking,
but i
: I get an OutOfMemoryException after a few iterations of the following loop:
: LOOP:
: ramdir = new RAMDirectory( "path/to/my/directory" );
: searcher = new IndexSearcher( reader );
: searcher.search(new TermQuery( new Term( "field", "keyword")));
: searcher.close();
:
: I'm using a HitCollector and would like to know the
: total number of results that matched a given query.
: Based on the JavaDoc, I this will do the trick:
you don't need a BitSet in that case, you could find that out just using
an int...
public CountingCollector extends HitCollector {
: I'm a novice with this, so I'll appreciate your patience.
: I'm using a batch program for doing the additions and deletions while a
: separate web app for searching. How can I ensure that these two different
: apps (one making the changes to index and the other just searching) don't
: run into e
All,
For performance reasons we keep our index of over a million documents ordered
alphabeticaly. This way for an alpha sort we can just use the index order.
This works very good, but I'm now looking for a way to insert a single
document to the index in the correct position.
Is there any s
Hi experts,
There seems to be a strange memory leak with the IndexSearcher.
I get an OutOfMemoryException after a few iterations of the following loop:
LOOP:
ramdir = new RAMDirectory( "path/to/my/directory" );
searcher = new IndexSearcher( reader );
searcher.search(new Term
thanks for the response Otis!
I'm a novice with this, so I'll appreciate your patience.
I'm using a batch program for doing the additions and deletions while a
separate web app for searching. How can I ensure that these two different
apps (one making the changes to index and the other just search
Otis Gospodnetic wrote:
If you are getting errors while searching and at the same either adding or
deleting documents, chances are you are not using the API correctly and
following the concurrency rules (described many times on this list). Yo ucan
search and modify your index at the same time
I don't think the attached code made it through on the first post. Here is a second try.
(See attached file: SetDirectory.java)(See attached file: query.jsp)(See attached file: QueryEngine.java)
---
David Maffitt, Senior Programmer-Analyst
Washington University School of Medicine [EMAIL PR
---
David Maffitt, Senior Programmer-Analyst
Washington University School of Medicine [EMAIL PROTECTED]
Electronic Radiology Laboratory voice 314.362.6965
Mallinckrodt Institute of Radiology fax314.362.6971
510 S. Kingshighway, St. Louis, MO
If you are getting errors while searching and at the same either adding or
deleting documents, chances are you are not using the API correctly and
following the concurrency rules (described many times on this list). Yo ucan
search and modify your index at the same time. Adding and deleting doc
We have a Lucene index of a small size(about 150k items) that requires
additions/deletions several times in a day. We could add or delete 3 to 4k
documents everytime we perform these operations.
While we perform this operation, we still need to be 'online' and available
for searching. And if we p
I figured that out. I was opening up a different, but similar, index.
That was made evident when I printed out the document.
Thanks so much,
Seeta
-Original Message-
From: Erick Erickson [mailto:[EMAIL PROTECTED]
Sent: Saturday, July 01, 2006 8:56 AM
To: java-user@lucene.apache.org
Subjec
Hey Everyone,
I'm using a HitCollector and would like to know the
total number of results that matched a given query.
Based on the JavaDoc, I this will do the trick:
Searcher searcher = new IndexSearcher(indexReader);
final BitSet bits = new
BitSet(indexReader.maxDoc());
searcher.search(que
Alexander:
You might also look through the mail archive for "database". There have been
several dicsussions on that topic with input from people far more
knowledgable than me that you might find relevant .
Erick
Amit:
You can make arbitrarily complex boolean clauses, see BooleanQuery. For
that, you don't need a filter. You can add boolean clauses with MUST, SHOULD
and MUST NOT (AND, OR, NOT). Filters are for restricting queries that
create (under the covers) a large BooleanQuery. You shouldn't think abo
23 matches
Mail list logo