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...
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...
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!
...
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!
...
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...
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...
I don't understand , what are the segments in Lucene ?
What are the benefits of Lucene's segments?
Thanks .
...
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
...
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...
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...
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 ...
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?
...
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...
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?
...
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 ...
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...
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...
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 ...
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...
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...