lucene.net

[LUCENE.NET] How to incorporate multiple fields in QueryParser?

Dim qp1 As New QueryParser("filename", New StandardAnalyzer()) Dim qp2 As New QueryParser("filetext", New StandardAnalyzer()) . . Instead of creating 2 separate QueryParser objects and using them to obtain 2 Hits objects, is it possible perform a search on both fields using a single QueryParser object, so that I have only on Hits objec...

How to update a Lucene.NET index?

I'm developing a Desktop Search Engine in Visual Basic 9 (VS2008) using Lucene.NET (v2.0). I use the following code to initialize the IndexWriter Private writer As IndexWriter writer = New IndexWriter(indexDirectory, New StandardAnalyzer(), False) writer.SetUseCompoundFile(True) If I select the same document folder (containing file...

[LUCENE.NET] How to use a field from Index to delete an entry?

I'm developing a Desktop Search Engine in VB 9 using Lucene.NET I wish to delete and create a new entry for a file that is updated. The Index stores complete file path and the last modified date. doc.Add(New Field("path", filepath, Field.Store.YES, Field.Index.UN_TOKENIZED)) doc.Add(New Field("modified", New FileInfo(filepath).LastWri...

SQL Server 2008 Full Text Search (FTS) versus Lucene.NET

I know there have been questions in the past about SQL 2005 versus Lucene.NET but since 2008 came out and they made a lot of changes to it and was wondering if anyone can give me pros/cons (or link to an article). ...

Caching Lucene.net search results

I've used Lucene.net to implement search functionality (for both database content and uploaded documents) on several small websites with no problem. Now I've got a site where I'm indexing 5000+ documents (mainly PDFs) and the querying is becoming a bit slow. I'm assuming the best way to speed it up would be to implement caching of some ...

Required Column error in setting up Linq to Lucene.net

I have decorated my entity's partial class as such: [Document(MetadataType=typeof(CompanyMetaData))] public partial class Company{} And created a meta data class as such: class CompanyMetaData { [Field(FieldIndex.UnTokenized, FieldStore.Yes, IsKey = true)] public object Id { get; set; } [Field(FieldIndex.UnTokenized, ...

How to get more out of Lucene.net

I'm trying to incorporate Lucene.net in my web search. Currently I have a lucene.net index that contains +1 million documents with 7 fields each. The last field is the "all" field that has the content of the previous fields concatenated. Searching the all field is just EXTREMELY fast :) But I feel there is more to be found here. How ca...

How to create more complex Lucene query strings?

This question is a spin-off from this question. My inquiry is two-fold, but because both are related I think it is a good idea to put them together. How to programmatically create queries. I know I could start creating strings and get that string parsed with the query parser. But as I gather bits and pieces of information from other re...

Polling Long Running Windows Service from ASP.NET

We have an application that uses Lucene.NET within a windows service to reindex our app for search. Our admin section can trigger a full reindex in Lucene, and currently the only way to review its progress is through a log file written to disc. This is clunky. We'd like to poll the service to determine the reindexing progress. Does a...

Get query terms from Lucene query for highlighting

My Lucene queries will usually exist of a bunch of AND combined fields. Is it possible to get the queried fields out of the Query object again? ...

Indexing multi-lingual content with Lucene.net

I use Lucene.net for indexing content & documents etc.. on websites. The index is very simple and has this format: LuceneId - unique id for Lucene (TypeId + ItemId) TypeId - the type of text (eg. page content, product, public doc etc..) ItemId - the web page id, document id etc.. Text - the text indexed Title - web page titl...

What is the latest version of Lucene.net?

From where do I download the latest version of Lucene.net dll? I am right now using 2.0.0.4 version but its MultiFieldQueryParser's constructor does not accept boost values. ...

Using lucene.net trunk on a production application

Currently I'm prototyping search with Lucene.Net-2.0-004 on a web application. It's working very well, but it's quite an old version of Lucene.net Is it "safe" to use the trunk version ? Are you doing it ? ...

Tips/recommendations for using Lucene

I'm working on a job portal using asp.net 3.5 I've used Lucene for job and resume search functionality. Would like to know tips/recommendations if any with respect to Lucene performance optimization, scalability, etc. Thanks a ton! ...

Showing search documents count under each category

I need to show total documents count for each category in my search results...for example: Rock(1010) Blues(5030) Pop(2209) : : I was reading somewhere that using TopFieldDocCollector is more efficient than HitCollector class. Given my requirement, how do I use TopFieldDocCollector class?or is there any other approach in Lucene? ...

Handling Lucene query parser errors

My application takes a user inputted string and tries to parse it with the Lucene query parser. I noticed however that there are several formats of strings that provoke an error in this query parser. e.g.: ~anystring anystring + First I tried molding my user inputted string so that it could not contain these cases, but as I see it, t...

Why is this Lucene query a "contains" instead of a "startsWith"?

string q = "m"; Query query = new QueryParser("company", new StandardAnalyzer()).Parse(q+"*"); will result in query being a prefixQuery :company:a* Still I will get results like "Fleet Africa" where it is rather obvious that the A is not at the start and thus gives me undesired results. Query query = new TermQuery(new Term("company",...

Let Lucene include spaces in term for exact match

I want my Lucene query to contain something similar to: companyNam:mercedes trucks Where it will do an exact match for the string "mercedes trucks" in the companyName field. The companyName is an untokenized field, but anything with a space returns null results.. new TermQuery(new Term("companyName", "mercedes trucks")); Always ...

Deleting and updating documents in Lucene index

Hi, Am using Lucene.Net dll version 2.0.0.4 Looks like its IndexWriter class does not have methods for DeleteDocument and UpdateDocument.Am i missing something here?How do i achieve delete,update functionality in this version of dll? Version 2.1 Lucene dll seems to have support for delete and update documents: public virtual void Dele...

What are some good resources on using Lucene.Net?

Does anyone know where I can find out more information on Lucene.Net? I am looking for a tutorial or videos on how to use Lucene.Net that stack overflow users can personally recommend. ...