lucene.net

Querying against a comma separated list of IDs with Examine and Lucene.Net?

六月ゝ 毕业季﹏ 提交于 2019-12-12 13:11:52
问题 I am using Examine for Umbraco (which is built on top of Lucene.net) to do my search. I am quite sure my problem is Lucene related. One of my fields contains a list of comma separated IDs. How do I query this field in the right way? Eg. I have a field with the values "64,65". I have tried using MultipleCharacterWildcard which only returns a result if I query for the ID 64, but not for ID 65. SingleCharacterWildcard does not return anything, and Fuzzy only returns something if there is only

figuring out reason for maxClauseCount is set to 1024 error

半城伤御伤魂 提交于 2019-12-12 09:30:03
问题 I've two sets of search indexes. TestIndex (used in our test environment) and ProdIndex(used in PRODUCTION environment). Lucene search query: +date:[20090410184806 TO 20091007184806] works fine for test index but gives this error message for Prod index. "maxClauseCount is set to 1024" If I execute following line just before executing search query, then I do not get this error. BooleanQuery.SetMaxClauseCount(Int16.MaxValue); searcher.Search(myQuery, collector); Am I missing something here? Why

Combining hits from multiple documents into a single hit in Lucene

孤人 提交于 2019-12-12 08:17:34
问题 I am trying to get a particular search to work and it is proving problematic. The actual source data is quite complex but can be summarised by the following example: I have articles that are indexed so that they can be searched. Each article also has multiple properties associated with it which are also indexed and searchable. When users search, they can get hits in either the main article or the associated properties. Regardless of where a hit is achieved, the article is returned as a search

Lucene - custom analyzer/tokenizer to index JSON key pair values

拈花ヽ惹草 提交于 2019-12-12 03:52:36
问题 I'm aiming to store and index JSON key pair values. Ideally I would store them in a constant fieldname. (For simplicity sake, "GRADES") An example of the incoming JSON object: "Data": [{ "Key": "DP01", "Value": "Excellent" }, { "Key": "DP02", "Value": "Average" }, { "Key": "DP03", "Value": "Negative" }] The JSON object would be serialized and stored as it is, but I would like to index it in a way to enable me to search within that same field by key and value. The main idea is to search

Lucene - Querying multiple terms in a field

孤街浪徒 提交于 2019-12-12 03:32:32
问题 For simplicity sake, consider two documents with the following fields and values: RecordId: "12345" CreatedAt: "27/02/1992" Event: "Manchester, Dubai, Paris" Event: "Manchester, Rome, Madrid" Event: "Madrid, Sidney" RecordId: "99999" CreatedAt: "27/02/1992" Event: "Manchester, Barcelona, Rome" Event: "Rome, Paris" Event: "Milan, Barcelona" Is it possible to perform a search for multiple terms within a single instance of a "Event" field ? Lets say I want to search for "Manchester" and "Paris"

Sitecore 8.1 : Lucene.Net.Store.LockObtainFailedException

╄→гoц情女王★ 提交于 2019-12-12 03:28:01
问题 We have sitecore 8.1 hosted in Azure WEB Apps. The setup is 1xCA and 2xCD and using LUCENE We noticed a error log below which I googled but could not get solution. ManagedPoolThread #12 2015:12:28 23:22:33 ERROR Exception Exception: System.Reflection.TargetInvocationException Message: Exception has been thrown by the target of an invocation. Source: mscorlib at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) at System.Reflection

Lucene 'join' how-to?

只愿长相守 提交于 2019-12-12 02:59:23
问题 Using Nhibernate.Search at the moment. Some code for context: [Indexed] class foo { [DocumentId] int id {get;set;} bar bar {get;set;} } [Indexed] class bar { [DocumentId] int id {get;set;} } Question: How to retrieve all foos where foo.bar.id==1 using IFullTextQuery? 回答1: If you want to include related information into the foo index you may look into the IndexedEmbeddedAttribute. This will allow you to query for relationships such as if there was a Name property on the bar object you could

Detect duplicate English names

末鹿安然 提交于 2019-12-12 02:44:01
问题 I'm attempting to find an example that demonstrates a Lucene or some other kind of index that can check an English first & last name combination for possible duplicates. The duplicate check needs to be able to take into account common nicknames, i.e. Bob for Robert and Bill for William, as well as spelling mistakes. Does anyone know of an example? I plan to perform the duplicates search during user registration. The new user record needs to be checked against an index that has been built from

How to suggest only single words but index phrases

痴心易碎 提交于 2019-12-11 18:53:38
问题 I am having troubles right now. I am using ShingleAnalyzerWrapper to index phrases. But I need the SpellChecker to suggest me only single words. How can i index phrases but search for both phrases and single words with SpellChecker? Please, give some advice. 回答1: Use this constructor, for your ShingleAnalyzerWrapper ShingleAnalyzerWrapper(Analyzer defaultAnalyzer, int minShingleSize, int maxShingleSize, String tokenSeparator, boolean outputUnigrams, boolean outputUnigramsIfNoShingles) passing

Lucene.Net: Relevancy by distance between words

浪子不回头ぞ 提交于 2019-12-11 17:15:55
问题 I create (and update frequently) the index of users using following code (a bit shortened for demonstration purposes here): Lucene.Net.Store.Directory directory = FSDirectory.Open(new System.IO.DirectoryInfo("TestLuceneIndex")); StandardAnalyzer standardAnalyzer = new StandardAnalyzer(Lucene.Net.Util.Version.LUCENE_29); IndexWriter indexWriter = new IndexWriter(directory, standardAnalyzer, IndexWriter.MaxFieldLength.UNLIMITED); Document doc = new Document(); doc.Add(new Field("UID", uid,