Best Locking approach (Directory Lock)

2009-12-02 Thread Shai Erera
Hi We've run into problems w/ LockFactory usage on our system. The problem is that the system can be such that the index is configured on a local file system, or a remote, shared one. If remote/share, the protocol is sometimes SMB 1.0/2.0, Samba, NFS 3/4 etc. In short, we have no control on the FS

RE: Best Locking approach (Directory Lock)

2009-12-02 Thread Uwe Schindler
Hi Shai, > have other uses as well? What about multiple IndexWriters from the same > JVM? This also needs a lock. But if it is guaranteed to only have one JVM accessing the index, you can use an in-JVM-Locking mechanism which is provided by http://lucene.apache.org/java/3_0_0/api/all/org/apache/l

Re: Best Locking approach (Directory Lock)

2009-12-02 Thread Shai Erera
I have multiple JVMs on different machines accessing the shared file system. I don't really have multiple IndexWriters on the same JVM, I asked this just out of curiosity. So I don't understand from your reply if it's safe to use NoLockFactory, or I should use SimpleFSLockFactory and unlock if nee

java.lang.NegativeArraySizeException on searching using Integer.MAX_VALUE for number of hits

2009-12-02 Thread Paul Taylor
Hi, just upgraded my code to Lucene 3.0 and on one simple search I get the following stacktrace when I pass Integer.MAX_VALUE to the Searcher.search(Query query,int n) method, if I change the value to 1000 it works okay. java.lang.NegativeArraySizeException at org.apache.lucene.util.Prior

Re: Best Locking approach (Directory Lock)

2009-12-02 Thread Michael McCandless
Currently the sole usage of the LockFactory within Lucene is for the write.lock, ie, to prevent more than one writer (= IndexWriter, or, IndexReader trying to do deletions or set norms) from being open on the index at once. If your app has external mechanisms that can ensure, without fail, that on

Re: Best Locking approach (Directory Lock)

2009-12-02 Thread Shai Erera
Thanks Mike. I'm pretty sure about our mechanism to control one JVM opening the index for write, but bugs can always be discovered. That's why we used NativeFSLockFactory - because even if the JVM is killed, the lock file should be removed. So if we do find the lock, it's fishy (Siamese or not). B

About Lucene ...

2009-12-02 Thread archibal
Hello all, I'm actually looking for a software who can search in a computer (and on windows network drive) all files and the contents of files based on indexing method. I have few questions about lucene : - Lucene engine does index only the contents ? or is it possible to index the name of fold

RE: java.lang.NegativeArraySizeException on searching using Integer.MAX_VALUE for number of hits

2009-12-02 Thread Uwe Schindler
If you want to have all results, you do something wrong. :-) Full text engines like lucene are made for returning only top-ranking results. So if you use TopDocs results you must know before how many TopDocs you want to have. Internally Lucene works with PriorityQueues that filter the top ranking

Re: About Lucene ...

2009-12-02 Thread Erick Erickson
Yes, Lucene is an API. You'd have to write a significant amount of code to accomplish what you want. The Lucene demo would be a good place to start. Lucene by itself doesn't index anything. You have to design a schema, feed it data and search that data. You can make it index file names, dates, siz

Re: About Lucene ...

2009-12-02 Thread Shashi Kant
This forum is probably not the best place to ask this question, since this is Lucene developers/users forum. If you want to write a tool, then this is the place is to be. If you want an ready tool, one I am aware of is searchmyfiles.exe from Nirsoft. http://www.nirsoft.net/utils/search_my_files.ht

Re: java.lang.NegativeArraySizeException on searching using Integer.MAX_VALUE for number of hits

2009-12-02 Thread Paul Taylor
Uwe Schindler wrote: If you want to have all results, you do something wrong. :-) Full text engines like lucene are made for returning only top-ranking results. So if you use TopDocs results you must know before how many TopDocs you want to have. Internally Lucene works with PriorityQueues that

Re: About Lucene ...

2009-12-02 Thread Stefan Trcek
On Wednesday 02 December 2009 15:50:45 archibal wrote: > > -optionnally i want to have a central server which index all data > (name of files, folders and file content) on network and i would like > to connect via a browser on the central server ? are there project > who does this or something like

Re: About Lucene ...

2009-12-02 Thread Stefan Trcek
On Wednesday 02 December 2009 16:20:28 Stefan Trcek wrote: > On Wednesday 02 December 2009 15:50:45 archibal wrote: > > -optionnally i want to have a central server which index all data > > (name of files, folders and file content) on network and i would > > like to connect via a browser on the cen

Potential leak of file resources in SpellChecker

2009-12-02 Thread Eirik Bjørsnøs
Hi, I'm using SpellChecker (in Lucene contrib) to help users of SVNSearch who can't type right: http://svnsearch.org/svnsearch/repos/ASF/search?logMessage=lusene SpellChecker works very well for my purpose, but I've encountered a possible file resource leak issue: I can't find any way to close

Migrating to Open-Source Search with Lucene and Solr/ Free Webinar 8-Dec 2pm ET/11amPT/1900 GMT

2009-12-02 Thread Erik Hatcher
WEBINAR: Hosted by KMWorld and featuring speakers from The Motley Fool and Lucid Imagination Tuesday, Dec 8: 2pm ET/11amPT/1900 GMT Sign up here: http://www.kmworld.com/webinars/lucid/08dec2009/luc3 Greetings, I'll be presenting along with some of our customers from Motley Fool at a free we

Caching analyzed query

2009-12-02 Thread Erdinc Yilmazel
Hi, In my application certain kind of queries for certain kinds of inputs will be repeated on the lucene index. The application flow is something like this: 1. Get input A 2. Lookup a key/value store for key A 3. Load a text from key value store to be used as a query 4. Analyze the te

Storing image with Lucene

2009-12-02 Thread blazingwolf7
Hi, As per title...is it possible to store image using Lucene? And if its possible...how can I do that? Thanks -- View this message in context: http://old.nabble.com/Storing-image-with-Lucene-tp26620107p26620107.html Sent from the Lucene - Java Users mailing list archive at Nabble.com. -

Re: Storing image with Lucene

2009-12-02 Thread Anshum
Hi, Lucene supports string/int literals for indexing and searching. In other words, anything that can be transformed into a string/int can be consumed by the lucene api. Moreover, so are you trying to implement an image search? In that case perhaps you'd have to either figure out a transform else t

RE: Storing image with Lucene

2009-12-02 Thread Rao, Vaijanath
Hi, Yes you can, create a binary field which you can use to store the image in. Field(String name, Reader reader) Use this to store your image and use binaryValue() to get the image back. You can also look at storing the features of the image into the index in similar way. --Thanks and Regards

Re: Storing image with Lucene

2009-12-02 Thread blazingwolf7
Thanks for the reply...yes i am trying to create an Image Search. And I did create something similar to your suggestion on only storing the links. But due to some limitations being set on me...I have to find a way to store the image.. Maybe I could try the transform idea. Anshum-2 wrote: > >

Re: Storing image with Lucene

2009-12-02 Thread anshum.gu...@naukri.com
Hi Vaijanath, Just wanted to know if you can perform a search on the binary field (as I haven't tried this ever) ? --Original Message-- From: Rao, Vaijanath To: java-user@lucene.apache.org ReplyTo: java-user@lucene.apache.org Subject: RE: Storing image with Lucene Sent: Dec 3, 2009 08:27

Re: Storing image with Lucene

2009-12-02 Thread blazingwolf7
oh...thanks for the suggestion. I will try using the idea.If it works I will let u all know.. Anshum-2 wrote: > > Hi Vaijanath, > Just wanted to know if you can perform a search on the binary field (as I > haven't tried this ever) ? > --Original Message-- > From: Rao, Vaijanath > To: ja

Re: Storing image with Lucene

2009-12-02 Thread blazingwolf7
I found a solution already. That is to convert the image from byte array of the image >> string Then the string will be stored in the index. But beware, the byte will have to be encoded to Base64 or the image retrieved will be mess up(meaning the pic is totally ruin) blazingwolf7 wrote: > > o

Re: Caching analyzed query

2009-12-02 Thread Jake Mannix
What kind of queries are these? I.e. How much work goes into step 4? Is this a fairly standard combination of Boolean/Phrase/other stock Lucene queries built up out of tokenizing the text? If so, it's going to be nowhere near the bottleneck in your runtime (we're talking often way less than a mi