Questions tagged [lucene.net]

Lucene.NET is a source code, class-per-class, API-per-API, algorithmic port of the Java Lucene search engine to the C# and .NET platform utilizing the Microsoft .NET Framework and .NET Standard. NOTE: You should almost always include the [lucene] tag when using this one. The Lucene.NET design is similar to its Java counterpart and you are more likely to get a satisfactory answer when it is included.

1845 questions
7
votes
3 answers

Handling + as a special character in Lucene search

How do i make sure lucene gives me back relevant search results when my input string contains terms like c++? Lucene seems to ignore ++ characters. Code details: When I execute this line,I get a blank search query. queryField =…
Ed.
  • 1,654
  • 7
  • 20
  • 33
7
votes
3 answers

Lucene / Lucene.NET - Document.SetBoost() values?

I know it takes in a float, but what are some typical values for various levels of boosting within a result? For example: If I wanted to boost a document's weighting by 10% then I should set it 1.1? For 20% then 1.2? What happens if I start setting…
mwjackson
  • 5,403
  • 10
  • 53
  • 58
7
votes
1 answer

lucene.net combine multiple filters and no search terms

How can I do a Filter across multiple fields in Lucene.Net? On one field I simply do: TermQuery tool = new TermQuery(new Term("Tool", "Nail")); Filter f = new QueryFilter(tool); If I now wanted to add a nail length to the filter, how can I do…
Mo
7
votes
3 answers

Lucene.net - Crashes during indexing

My indexer, using Lucene, seems to crash during indexing operations after writing an index file approximately 16GB in size. The stack trace written to the console is repeated three times for reasons I don't know. For brevity I've only supplied the…
Dai
  • 141,631
  • 28
  • 261
  • 374
6
votes
4 answers

Best practices for combining Lucene.NET and a relational database?

I'm working on a project where I will have a LOT of data, and it will be searchable by several forms that are very efficiently expressed as SQL Queries, but it also needs to be searched via natural language processing. My plan is to build an index…
FlySwat
  • 172,459
  • 74
  • 246
  • 311
6
votes
3 answers

NHibernate Search - Multiple Web Servers

I am using the NHibernate.Search assembly and am looking for best practices around using this with multiple web servers. We have plenty of space on our web servers to handle the indexes we are generating, so I am thinking the best route is to have…
Brandon
  • 10,744
  • 18
  • 64
  • 97
6
votes
2 answers

In Lucene, why do my boosted and unboosted documents get the same score?

At index time I am boosting certain document in this way: if (myCondition) { document.SetBoost(1.2f); } But at search time documents with all the exact same qualities but some passing and some failing myCondition all end up having the same…
Barka
  • 8,764
  • 15
  • 64
  • 91
6
votes
1 answer

Lucene.net range queries + highlighting

Yet another Lucene.net question by an extreme newbie to it. This time, I have found an interesting issue with using a query that contains a range and using highlighting. I am writing this from memory, so please forgive any syntax errors. I have a…
nokturnal
  • 2,809
  • 4
  • 29
  • 39
6
votes
1 answer

How to sort/filter using the new Sitecore.Search API

I couldn't find any way to do sort and filter using the new Sitecore.Search API. Lucene provides the following methods: Search(Query query, Filter filter) Search(Query query, Sort sort) Search(Query query, Filter filter, Sort sort) But I don't…
Sudeep
  • 349
  • 2
  • 14
6
votes
2 answers

Lucene RangeQuery doesn't filter appropriately

I'm using RangeQuery to get all the documents which have amount between say 0 to 2. When i execute the query, Lucene gives me documents which have amount greater than 2 also. What am I missing here? Here is my code: Term lowerTerm = new…
user40907
  • 1,532
  • 5
  • 24
  • 33
6
votes
4 answers

Index replication and Load balancing

Am using Lucene API in my web portal which is going to have 1000s of concurrent users. Our web server will call Lucene API which will be sitting on an app server.We plan to use 2 app servers for load balancing. Given this, what should be our…
user40907
  • 1,532
  • 5
  • 24
  • 33
6
votes
4 answers

Fast in-memory inverted index

I am looking for a fast in-memory implementation of a generic inverted index. All I need is to store features with weights for a couple million entities and use the inverted index to compute similarities between entities using various distance…
evgenyp
  • 353
  • 3
  • 10
6
votes
3 answers

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…
Boris Callens
  • 90,659
  • 85
  • 207
  • 305
6
votes
2 answers

How do I perform an AND search in Lucene.net when multiple words are used in a search?

I am playing around with Lucene.net to try and get a handle of how to implement it in my application. I have the following code ..... // Add 2 documents var doc1 = new Document(); var doc2 = new…
KallDrexx
  • 27,229
  • 33
  • 143
  • 254
6
votes
1 answer

Lucene.net 4.8 - IDE doesn't recognize Lucene.Net.Standard as well as the StandardAnalyzer's

Im using Lucene.net version 4.8beta, and when trying to use an Analyzer it doesnt recognize StandardTokenizer. I am already using Lucene.Net.Analysis. I am using Visual Studio I have already tried using NuGet package manager to uninstall, and then…
timfkl
  • 61
  • 2