Reputation: 1682
I've developed an index and search application with Lucene library. but this library has some limitation in custom ranking in my context, aside from its performance, i need scalability and access to all kinds of word frequencies and etc. is there any powerful open source full text library available?
Upvotes: 16
Views: 20189
Reputation: 460
You can use the library Bsa.Search.Core to search in .Net
The library contains 4 index types:
Example of using Memory index
var field = "*";
var query = "one | two";
var documentIndex = new MemoryDocumentIndex();
var content = "one two one two second try to welcome";
var title = "one first second four";
while (!documentIndex.IsReady)
{
Thread.Sleep(500);
}
var searchService = new SearchServiceEngine(documentIndex);
var doc = new IndexDocument("ExternalId");
doc.Add("content".GetField(content);
// filter
doc.Add("intValue".GetFilterField(10));
doc.Add("longValue".GetFilterField(20l));
doc.Add("dateValue".GetFilterField(DateTime.UtcNow));
searchService.Index(new IndexDocument[]
{
doc
});
var query = "one | two";
var parsed = query.Parse("*");
var request = new SearchQueryRequest()
{
Query = parsed,
Field = field,
ShowHighlight = true,
OrderField = SortOrderFields.Relevance,
Order = SortOrder.Desc,
Size = 20,
Fields = new List<string>()
{
"content","id"
},
Filter = new FilterClause()
{
Condition = FilterCondition.Equal,
Value = "intValue".GetFilterField(10),
Next = new FilterClause()
{
Condition = FilterCondition.Great,
Value = "longValue".GetFilterField(21l)
}
}
};
var result = searchService.Search(request);
Upvotes: 2
Reputation: 29965
http://www.sphinxconnector.net/
Key Sphinx features are:
To expand a bit, Sphinx:
Upvotes: 6