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.

Filter by
Sorted by
Tagged with
0 votes
1 answer
15 views

Lucene: Way to have case-insensitive MappingCharFilter or apply LowerCaseFilter before it?

Is there a way to have a LowerCaseFilter before the MappingCharFilter? I realize I could just lowercase the search input before passing into Lucene but this Analyzer is only for a specific field so it'...
azulBonnet's user avatar
0 votes
0 answers
6 views

ReuseStrategy in Lucene 4.0

I'm creating my own analyzer that is based on StopWordAnalyzerBase. In order to make function AddDocument as it was in 3.0, I need to change ReuseStrategy according to Lucene Documentation. But I don'...
WalterFox's user avatar
0 votes
0 answers
50 views

How to return total items of a Lucene query in Orchard

I have this query in OrchardCore to return paged result of Product content type: { "track_total_hits": true, "from" : {{ from }}, "size" : {{ size }}, "query&...
amin mohammadi's user avatar
0 votes
0 answers
17 views

Lucene.Net TermRangeQuery: How to exclude string values outside range

Suppose I have a collection of values stored in a Lucene index: "Item-1-1" "Item-1-2" "Item-1-3" ... "Item-1-10" "Item-1-11" "Item-1-12" ...
thndrwrks's user avatar
  • 1,644
0 votes
0 answers
59 views

Lucene.NET can't find some words when searching?

Lucene.NET can't find some words when searching? for example "on" Below is a search for Lucene using the StandardAnalyzer. Name of the field to search "LcnKey" LcnKeys = "on ...
Emrah AKIN's user avatar
0 votes
2 answers
89 views

Lucene | How to find prefix matches at beginning of field?

I want to match prefixes near the start of a field. I have this, but it's not matching the prefix; it only matches the whole word if the search term matches it. It seems like there's no way to combine ...
azulBonnet's user avatar
0 votes
1 answer
25 views

Is there a Lucene Analyzer that will ignore the difference between greek symbol and phonetic english name?

Ideally, I'd like something that otherwise acts like a StandardAnalyzers but treats all Greek Symbols as equivalent with their English phonetic spelling ("beta" == "β", "omega&...
azulBonnet's user avatar
2 votes
1 answer
53 views

Does Lucene support multilevel indexing?

The structure of data to index is like below: { "EmailId":"1", //should be stored "EmailText":"hello world", "Attachments": { ...
Mohit's user avatar
  • 65
0 votes
0 answers
15 views

Document is being deleted after updating lucene.net

I am using lucene.net 4.8.0 beta version in my .net core project.i want to update a document but after updating the document is being deleted from index this is my code: var d = new Document() ...
reza setareh's user avatar
0 votes
0 answers
41 views

Using "AND" operator in Lucene.net query

i am using lucene.net in my project.i use fuzzy search and term query search with eachother but i dont get correct data this is my code below var query = new BooleanQuery(); var parts = ...
reza setareh's user avatar
0 votes
1 answer
40 views

Lucene.NET returning the wrong document in queries after document is updated

Search works as expected until I update a document in the index. The document that was updated no longer returns in searches, rather a complete unrelated document with docId=0 gets returned instead. ...
fraxiinus's user avatar
0 votes
1 answer
51 views

Lucene .NET Snowball Analyzer does not exist in the namespace Lucene.Net.Analysis

I am writing an application using ASP.NET Core and I have installed the Lucene .NET 3.0.3 Nuget package but when I tried to use the SnowballAnalyzer class, it seems that it is not appearing and the ...
Joseph's user avatar
  • 502
0 votes
0 answers
41 views

Questions about lucene.net4.8 faceted search

This is my code to create lucene.net index, the version used is lucene.net 4.8 beta16 The strange thing is, before adding the faceted index, my product data is 1.09 million, but after adding the ...
DreamSlave's user avatar
1 vote
2 answers
157 views

Lucene search to match exact element in Umbraco array

I'm trying to search Umbraco (v10) tags, which are stored as an array. Regardless of whether they are stored in CSV or JSON, I can't force an exact match. For example, one article has tags containing ...
Ian's user avatar
  • 1,475
1 vote
1 answer
63 views

Check and fetch the exact match in lucene.net

I tried with PhraseQuery and MultiPhraseQuery to find the exact line match. It is pulling records similar to wildcard search. Tried with Index.Not_Analysed too but no luck. The data looks like below: &...
Suneel Kumar's user avatar
0 votes
0 answers
37 views

Lucene.Net 4.8.0-beta00016 is throwing exception when i try to read FastTaxonomyFacetCounts from File Directory

I'm using Lucene.Net 4.8.0-beta00016 version and using .Net 6.0. When i write to RAMDirectory i'm able to fetch FastTaxonomyFacetCounts if i try to fetch from Directory (File System) it is throwing ...
Suneel Kumar's user avatar
1 vote
1 answer
136 views

How to register lucene in dependency injection?

I am having trouble to find information about registering the different building blocks of Lucene into the dependency injection. I am also not sure about the lifetimes. I think one should reuse the ...
jeb's user avatar
  • 858
0 votes
0 answers
58 views

Lucene 4.8 facets usage

I have difficulties understanding this example on how to use facets : https://lucenenet.apache.org/docs/4.8.0-beta00008/api/Lucene.Net.Demo/Lucene.Net.Demo.Facet.SimpleFacetsExample.html My goal is to ...
Skary's user avatar
  • 1,322
0 votes
1 answer
48 views

Lucene Net Search fail if term is too short

I am new to Lucene, so maybe this is a techical limit i dont understand. I have indexed few text and the try to fetch the content. If i query this text open-source reciprocal productivity with the ...
Skary's user avatar
  • 1,322
3 votes
1 answer
102 views

lucene .net parser for filter and sorting

In our lucene .net based search (Lucene 4.8.0-beta00016) we save the generated query, the filter and the sorting in a custom text file. e.g.: "Query":"+name:*test*" "Filter&...
SvenG's user avatar
  • 5,155
0 votes
1 answer
50 views

apache/lucenenet Unable to limit memory usage - RAMBufferSizeMB, RAMPerThreadHardLimitMB, and MaxBufferedDocs in IndexWriterConfig has no effect

Note that I've also posted an issue on GitHub on the repo: https://github.com/apache/lucenenet/issues/784 I'm running the latest Lucene .NET versions: Lucene.Net 4.8.0-beta00016 Lucene.Net.Analysis....
PeterOeClausen's user avatar
1 vote
1 answer
141 views

Lucene.net 4.8 sort returns doc with NULL fields. Invalidating sort

Using Lucene.Net, the indexer index object with a field in Document specifically used for sorting like this : new TextField("lastname-sort", person.LastName.RemoveDiacritics(), Field.Store....
Cromm's user avatar
  • 338
2 votes
1 answer
33 views

Lucene : Best way to store and query a datastructure

I have a product whose price vary with day of week and season (like hotel room). So consider , i have a rate card (and I can attach multiple rate cards to a product) RateCard fields are DateTime ...
user2799564's user avatar
0 votes
0 answers
23 views

In Lucene.net 4.8, how do I count the number of hits per document?

I am using Lucene.NET 4.8.0 or later versions. While doing search how do I get individual hit counts within each document For example my search word is "word", the results I want is Document ...
Sagar Kardani's user avatar
1 vote
1 answer
165 views

Grouping on Lucene.net

` public static async Task<List<string>> SearchGroup(string filedName, Query bq, Filter fil, IndexSearcher searcher) { //分组的最大数量 int groupNum = 100; ...
DreamSlave's user avatar
0 votes
1 answer
141 views

lucene.net 4.8 custom sorting according to string length

How can I sort by string length? For example, I use lucene.net to search, the keyword is "toluene", then the name of "toluene" is in the front, and the name containing "...
DreamSlave's user avatar
1 vote
1 answer
131 views

How to highlight only results of PrefixQuery in Lucene and not whole words?

I'm fairly new to Lucene and perhaps doing something really wrong, so please correct me if it is the case. Being searching for the answer for a few days now and not sure where to go from here. The ...
Kasbolat Kumakhov's user avatar
0 votes
1 answer
92 views

what is correct way to store & search alphabet-numeric field in Lucene.Net?

I have a field act number which likely have very random pattern, where they contain alphabets, numbers, special characters. for example 'A-318-215', 'oa/6521', 'IA No. 856', 'Application no 7455' etc....
gaurav's user avatar
  • 1,281
0 votes
2 answers
308 views

How to handle System.MissingMethodException in Lucent.net dll?

I new to Lucene & C#. I am trying to replicate the example given on Lucene.net tutorial but when i running the code it is showing Unhandled exception. System.MissingMethodException: Method not ...
gaurav's user avatar
  • 1,281
0 votes
1 answer
36 views

Why Lucene does not working when search on hierarchy folders with multiple words?

I am using Lucene to search files inside of the folders hierarchy below. The default root folder is always "Documents". The "Documents" folder also contains files. It is working ...
cris gomez's user avatar
0 votes
1 answer
110 views

Lucene.NET problem with Lucene.Version on .NET Framework 4.5.1

I try to install Lucene.NET version 4.8.0-beta000016 on .NET Framework 4.5.1 everything is good BUT when i try to start the application return error: System.IO.FileLoadException: 'Could not load file ...
Ivan Petkov's user avatar
0 votes
0 answers
42 views

Lucene.net can run on 64 bit OS?

I'm planning to use lucene.net for one of the .net core projects, but before that, I would like to know if anybody has used lucene.net on 64-bit OS. I hope it is compatible.
Kaushikkumar Halvadia's user avatar
1 vote
1 answer
57 views

Where is FloatField?

I've added Lucene.Net to a .Net 6 Core project and indexing docs with TextField, StringFiled, and Int32Field all work fine but FloatField doesn't seem to be supported. I'm using LuceneVersion....
JimSTAT's user avatar
  • 735
1 vote
1 answer
211 views

Searching Lucene.Net for Dates query

I am building a Lucene index (using Lucent.Net Version.LUCENE_30) and I am trying to search for a record based on a date. I create the index like this: if (sampleData.Start_Date != null) doc.Add(...
jason's user avatar
  • 3,633
0 votes
1 answer
197 views

Lucene calculate term vectors for existing index

With Lucene.net I would like to get the term vectors as described in this stackoverflow question. The problem is, the index is already generated with the field indexed and stored, but without term ...
NewDeveloper's user avatar
1 vote
1 answer
264 views

Lucene.NET TextField not being indexed

Using .NET 6.0 and Lucene.NET-4.8.0-beta00016 from NuGet I am having an issue implementing the quickstart example from the website. When using TextField in a document, the field is not indexed. The ...
Taylor's user avatar
  • 13
0 votes
1 answer
121 views

Lucene NET throwing Fatal Error: AccessViolationException

I am using Lucene NET v4.8 beta, and I have a method that is calling MaybeRefresh on a SearcherManager every 5 seconds. 99.9% of the time, everything works fine. However, 0.1% of the time, I am ...
Aiyuni's user avatar
  • 780
0 votes
0 answers
39 views

Lucene indexes are getting deleted while adding a document

I am using Lucene.Net. On some clients' machines all the indexes are getting deleted when we are trying to add a new document. Process: Check if document already exists If Exists delete Else add a ...
Kamlesh Joshi's user avatar
0 votes
1 answer
487 views

Which is the released version of Lucene.NET that supports .NET 6.0?

Is there a released version (not Beta) of Lucene.NET that supports .NET 6.0? If no, pls let me know when its likely to be released. I see that Lucene.NET 4.8.0 Beta version supports .NET 6.0, but is a ...
user11512871's user avatar
1 vote
1 answer
224 views

The best way to query the Lucene.NET index for documents HAVING or not a field (no matter it's content)?

I'm using the latest (beta) version of Lucene.NET 4.8. I have a pretty tricky access system, and I need my search engine to respect it. Hence, I need to filter my search queries by documents having or ...
Evengard's user avatar
  • 608
0 votes
0 answers
60 views

Lucene.net search on filed that is a list

tried [this approach][1] but did not work for me [1]: https://stackoverflow.com/questions/1917405/lucene-net-search-list I have a field that is a coma separated list of ids... like 500, 212, 303, ......
diegoarg79's user avatar
1 vote
0 answers
76 views

Lucene Index converting gen0 memory to unmanaged resource

I am using Lucene NET v4.8 beta, and I have noticed that my service consume more and more memory whenever I add huge amounts of data to the index. I analyzed this through dotMemory, seen below. The ...
Aiyuni's user avatar
  • 780
1 vote
1 answer
302 views

Lucene index files changing constantly even when there is no adding, updating, or deletion operations performed on it

I have noticed that, my lucene index segment files (file names) are always changing constantly, even when I am not performing any add, update, or delete operations. The only operations I am ...
Aiyuni's user avatar
  • 780
1 vote
0 answers
204 views

Why is Lucene.Net.Store.Azure throwing IndexNotFounException "no segments* file found in AzureDirectory" exception after modifying the index?

For some reason when I delete a document from a Lucene index it is throwing a "no segments* file found in AzureDirectory" exception. This only happens when trying to load the data stored ...
Michael Halpin's user avatar
1 vote
0 answers
164 views

Lucene.Net: How to match one or more of the search Fields?

I've started currently to use Lucene.Net to search across some txt files. I've implemented the single field search and it works awesome, but I'm stuck at the multiple fields part. It seems that the ...
Ion's user avatar
  • 81
2 votes
1 answer
257 views

Lucene.net 4.8 unable to search with accent

based on some help here in stack overflow I managed to create a custom analyzer, but still cant work around search where a word has an accent. public class CustomAnalyzer : Analyzer { ...
diegoarg79's user avatar
0 votes
1 answer
105 views

How to change default Similarity for Indexing and searching in Lucene.net 3.0.3

I am new in Lucene and I am trying to change the default similarity to BM25. I am using Lucene.net library (version 3.0.3) in a WPF project (.net 4.8). For instance for IndexSearcher I would expect to ...
TMAK's user avatar
  • 1
1 vote
1 answer
109 views

Read Lucene FSDirectory from WebApi

I am using FSDirectory to query a previously built (and also static) Lucene index. I would like to use the query from a WebApi, that's stateless and at the moment instantiate a new FSDirectory for ...
Skary's user avatar
  • 1,322
0 votes
1 answer
69 views

Extract unique listo of fields from maching document

I am new to Lucene, so maybe i have missunderstood something about how it works. I have indexed few hundred thousand documents with many string field. For example suppose we have 5 string field (named ...
Skary's user avatar
  • 1,322
0 votes
1 answer
29 views

Azure Search querying json metadata

I have indexed documents with a "MetadataFields" key whose values are json. "MetadataFields": "{"continent":"north america","country":"...
DeannaD's user avatar
  • 1,469

1
2 3 4 5
37