lucene

Lucene.NET - sorting by int

In the latest version of Lucene (or Lucene.NET), what is the proper way to get the search results back in sorted order? I have a document like this: var document = new Lucene.Document(); document.AddField("Text", "foobar"); document.AddField("CreationDate", DateTime.Now.Ticks.ToString()); // store the date as an int indexWriter.AddDoc...

Solr associations

Hi all, The last couple of days we are thinking of using Solr as our search engine of choice. Most of the features we need are out of the box or can be easily configured. There is however one feature that we absolutely need that seems to be well hidden (or missing) in Solr. I'll try to explain with an example. We have lots of documents...

Query for a exact string in Zend Lucene PHP

Im using the Zend Lucene however Im have a little trouble. I wish to query the index for the exact tring so page_name IS test123, not any fuzzy match. Currently I have: $hits = $index->find('page_name:"test123"'); And advice appreciated, thanks! ...

Query for a exact string in Zend Lucene PHP Not fuzzy match

Im using the Zend Lucene however Im have a little trouble. I wish to query the index for the exact tring so page_name IS test123, not any fuzzy match. Currently I have: $hits = $index->find('page_name:"test123"'); And advice appreciated, thanks! ...

How to optimize indexing of large number of DB records using Zend_Lucene and Zend_Paginator

So I have this cron script that is deployed and ran using Cron on a host and indexes all the records in a database table - the index is later used both for the front end of the site and the backed operations as well. After the operation, the index is about 3-4 MB. The problem is it takes a lot of resources (CPU: 30+ and a good chunk of...

Lucene.Net PrefixQuery

Hi, i´m development a suggest box for my site search service. I has to search fields like these: Visual Basic Enterprise Edition Visual C++ Visual J++ My code is: Directory dir = Lucene.Net.Store.FSDirectory.GetDirectory("Index", false); IndexSearcher searcher = new Lucene.Net.Search.IndexSearcher( dir,true); Term term = n...

What is the segment in Lucene ?

I don't understand , what are the segments in Lucene ? What are the benefits of Lucene's segments? Thanks . ...

How does Lucene work

I am trying to find out how lucene search works so fast. Cant find any useful docs on the web. If you have anything (short of lucene source code) to read, let me know. A text search query using mysql5 text search with index takes about 18 minutes in my case. A lucene search for the same query takes less than a second ...

How to setup Lucene/Solr for a B2B web app?

Given: 1 database per client (business customer) 5000 clients Clients have between 2 to 2000 users (avg is ~100 users/client) 100k to 10 million records per database Users need to search those records often (it's the best way to navigate their data) Possibly relevant info: Several new clients each week (any time during business h...

Exception thrown during hibernate-search query: org.hibernate.search.SearchException: No Lucene configuration set up for...

Hi, i'm facing problems executing a hibernate-search query. Every time when I search for a term that is contained in the lucene-index, the following exception is thrown: Caused by org.hibernate.search.SearchException with message: "No Lucene configuration set up for: de.gridworks.everein.model.Membership" org.hibernate.search.engi...

Can a raw Lucene index be loaded by Solr?

Some colleagues of mine have a large Java web app that uses a search system built with Lucene Java. What I'd like to do is have a nice HTTP-based API to access those existing search indexes. I've used Nutch before and really liked how simple the OpenSearch implementation made it to grab results as RSS. I've tried setting Solr's dataDir ...

How to find similar/related text with Zend Lucene?

Say I need to make searching for related titles just like stackoverflow does before you add your question or digg.com before submitting news. I didn't find a way how to do this with Zend Lucene. There are setSlop method for queries, but as I understand, it doesn't help. Is there any way to do this kind of searches? ...

does lucene search function work in large size document?

Hi,there I have a problem when do search with lucene. First, in lucene indexing function, it works well to huge size document. such as .pst file, the outlook mail storage. It can build indexing file include all the information of .pst. The only problem is to large sometimes, include very much words. So when i search using lucene, it o...

How to index BigDecimal values in Lucene 3.0.1

I have some BigDecimal values which should be indexed for searching. Lucene has NumericField but it has setters only for long, double, float and int. I could store it as a String but then I would not benefit from NumericRangeQuery. How you have stored your BigDecimals? Any best practices to share? ...

Lucene.NET - Find documents that do not contain a specified field

Let's say I have 2 instance of a class called 'Animal'. Animal has 3 fields: Name, Age, and Type The name field is nullable, so before I insert an instance of Animal as a Lucene indexed document, I check if Animal.Name == null, and if it does, I do not insert it as a field in my document. If I were to retrieve all animals, I would see ...

Lucene and Special Characters

I am using Lucene.Net 2.0 to index some fields from a database table. One of the fields is a 'Name' field which allows special characters. When I perform a search, it does not find my document that contains a term with special characters. I index my field as such: Directory DALDirectory = FSDirectory.GetDirectory(@"C:\Indexes\Name", fa...

Lucene Analyzer to Use With Special Characters and Punctuation?

I have a Lucene index that has several documents in it. Each document has multiple fields such as: Id Project Name Description The Id field will be a unique identifier such as a GUID, Project is a user's ProjectID and a user can only view documents for their project, and Name and Description contain text that can have special characte...

Lucene complex structure search

Basically I do have pretty simple database that I'd like to index with Lucene. Domains are: // Person domain class Person { Set<Pair> keys; } // Pair domain class Pair { KeyItem keyItem; String value; } // KeyItem domain, name is unique field within the DB (!!) class KeyItem{ String name; } I've tens of millions of profiles ...

Proper snowball analyzer configuration when using Grails Searchable Plugin

To improve stemming we want to switch from the default analyzer to snowball, however, having a lot of difficulty with the proper settings and would appreciate any help. In Environment: - Sun's Java 1.6.16 - Grails 1.2.2 - Searchable Plug-In 0.5.5 Config.groovy: Have tried both settings: compassSettings = ['compass.engine.analyze...

Lucene - How to index a value with special characters

I have a value I am trying to index that looks like this: Test (Test) Using a StandardAnalyzer, I attempted to add it to my document using: Field.Store.YES, Field.Index.TOKENIZED When I do a search with the value of 'Test (Test)' my QueryParser generates the following tags: +Name:test +Name:test This operates as I expect because...