lucene.net

Lucene.Net support phrases?: What is best approach to tokenize comma-delimited data (atomically) in fields during indexing?

I have a database with a column I wish to index that has comma-delimited names, e.g., User.FullNameList = "Helen Ready, Phil Collins, Brad Paisley" I prefer to tokenize each name atomically (name as a whole searchable entity). What is the best approach for this? Did I miss a simple option to set the tokenize delimiter? Do I have to ...

How to sort by a field that has an alternative value if null in lucene?

Hi folks. I want to sort my lucene(.net) search results by a date field (date1), but if date1 is not set, I'd like to use date2. The traditional sort method is to sort by date1, and then sort the values that are the same by date 2. This would mean that whenever I did fall back to date2, these values would be at the top (or bottom) of th...

Lucene - querying with long strings

I have an index, with a field "Affiliation", some example values are: "Stanford University School of Medicine, Palo Alto, CA USA", "Institute of Neurobiology, School of Medicine, Stanford University, Palo Alto, CA", "School of Medicine, Harvard University, Boston MA", "Brigham & Women's, Harvard University School of Medicine, Boston, M...

Manipulate score/rank on query results from NHibernate.Search

I've been working with NHibernate, NHibernate.Search and Lucene.Net to improve the search engine used on the website I develop. Basically, I use it to search contents of corporations specification documents. This is not to be confused with Lucene's notion of documents: in my case, a specification document (which I'll hereafter call a "...

Lucene search and underscores

When I use Luke to search my Lucene index using a standard analyzer, I can see the field I am searchng for contains values of the form MY_VALUE. When I search for field:"MY_VALUE" however, the query is parsed as field:"my value" Is there a simple way to escape the underscore (_) character so that it will search for it? EDIT: 4/1/2010 ...

Lucene.NET and searching on multiple fields with specific values...

Hi, I've created an index with various bits of data for each document I've added, each document can differ in it field name. Later on, when I come to search the index I need to query it with exact field/ values - for example: FieldName1 = X AND FieldName2 = Y AND FieldName3 = Z What's the best way of constructing the following using...

How do i search 'and' with lucene?

I am looking at the query syntax. and i could not figure out how to search 'and'. I tried "a sentence with and and words after it" i tried +and and \and. It always ignored it. How can i search 'and'? I am using lucene.net ...

Lucene.NET search index approach

Hi, I am trying to put together a test case for using Lucene.NET on one of our websites. I'd like to do the following: Index in a single unique id. Index across a comma delimitered string of terms or tags. For example. Item 1: Id = 1 Tags = Something,Separated-Term I will then be structuring the search so I can look for documents ag...

Lucene.NET (strings fuzzy matching)

Good day The question is: Could anyone give me an example about how to do fuzzy matching of two strings using Lucene.NET (or using Java version of Lucene, or in any other language that has port of Lucene). ...

Inspecting Lucene.NET index with Luke want to replicate NHibernate.Search view

Hi, I am trying to put together an index using terms, which I specify as a comma separated list. I want to replicate the display in Luke as seen here: http://ayende.com/Blog/archive/2009/05/03/nhibernate-search-again.aspx But my index value just shows as a single field with the comma separate list value. For example: Tags term,ano...

Lucene.NET - What is the Version parameter in MultiFieldQueryParser constructor?

We're running into a serious bug with the Lucene.NET 2.3 codebase. We're upgrading to Lucene 2.9 in hopes the bug is fixed. Upgrading to the latest version, we see that the MultiFieldQueryParser contructor is [Obsolete]: [Obsolete("Use the ctor with Version param instead.")] public MultiFieldQueryParser(string[] fields, Analyzer analyz...

How to get total number of potential results in Lucene

I'm using lucene on a site of mine and I want to show the total result count from a query, for example: Showing results x to y of z But I can't find any method which will return me the total number of potential results. I can only seem to find methods which you have to specify the number of results you want, and since I only want 1...

Lucene.net on a central server

Hi, I have a problem finding references to this subject and would appreciate some help. We have an application that uses a central sql server and a local lucene. Since the data is synchronized we wish to put the lucene on the same machine as the sql server and access it remotely. I was looking for documentation and examples on how to d...

Hyphens in Lucene

Hi, I'm playing around with Lucene and noticed that the use of a hyphen (e.g. "semi-final") will result in two words ("semi" and "final" in the index. How is this supposed to match if the users searches for "semifinal", in one word? Edit: I'm just playing around with the StandardTokenizer class actually, maybe that is why? Am I missi...

How do i get a document index so i can delete with lucene?

Basically i am doing this I think i'll set the document id as the thread id on my site (even if some types of thread wont be searched). So i can search by thread id but i am clue less of how to delete. I found pages that say use the document index and i need to optimize or close before changes take effect but i dont know how to get the ...

How do i keep my DB and lucene in sync?

So i can have a transaction in sql. But i am sure its not a good idea to wait in the middle of a transaction for lucene to finish also i am unsure if lucene is permanently saved in the DB until i do something there. Whats the best way to keep my DB and lucene in sync? I am thinking of adding a lucene_queue in my sql db and everytime i m...

Luke like tool in C#

Is there are Luke like tool for viewing lucene indexes in C# using the Lucene.NET api? ...

How do i delete/update a doc with lucene?

I am creating a tagging system for my site I got the basics of adding a document to lucene but i can seem to figure out how to delete a document or update one when the user changes the tags of something. I found pages that say use the document index and i need to optimize before effect but how do i get the document index? Also i seen an...

Lucene.net contains only last added document

It's a weird problem but every time I add a new document to Lucene.net it overrides the last one and thus it always holds the last inserted document. I've confirmed this behavior using LUKE which lets me open the index files. I'd appreciate if someone could shed light on the problem. Here is my code: public class SearchService : ISearch...

Disabling scoring in Lucene(.NET)

Hi, When searching, is there a way to disable scoring for any query? The scenario is that the user refines his query by trying different combinations of words, phrases etc., and needs realtime (well, reasonably fast at least) responses on the number of hits. Search time slows down a lot when there are millions of hits due to scoring...