English 中文(简体)
在可能修改 Luceen 的文本上的查询类型
原标题:Query type on text that may change in Lucene

I have a scenario in my project where we are using Lucene to search. I m indexing many fields. Now i store a typeId as one of those fields. The user needs to search on Type Text. But the issue is that the Type text can be later modified. But reindexing is not an option. Need some better solution,so please can Lucene users guide me with some solutions.

我能想到的解决方案是检查搜索文本是否为 TypeText, 然后将搜索文本操作到 TypeId:GuidValue, 然后打开查询 。

Lucene用户能提供一些更好的想法吗? Luceen用户对Lucene非常熟悉,阅读了各种Query类型Lucene的报价,但我理解如何最好地利用这些报价。

提前感谢。

最佳回答

如果我理解正确的话, 您有某些类型对象, 具有可更改的文本属性, 并且 ID 属性是不会更改的图形用户界面 。

如果您不想更改索引中的 Type. Text 值, 您需要解析在应用程序中对应的 Type. Id, 然后查询适当的 Type. Id 。 (如您的解决方案所示)

但不想要更新索引化文本值类型,就无法实现使用文本索引化引擎的目的。

问题回答

暂无回答




相关问题
Lucene.NET in medium trust

How do I make Lucene.NET 2.3.2 run in a medium trust environment? GoDaddy doesn t like it the way it is.

Grails searchable plugin

In my Grails app, I m using the Searchable plugin for searching/indexing. I want to write a Compass/Lucene query that involves multiple domain classes. Within that query when I want to refer to the id ...

Search subset of objects using Compass/Lucene

I m using the searchable plugin for Grails (which provides an API for Compass, which is itself an API over Lucene). I have an Order class that I would like to search but, I don t want to search all ...

Lucene seems to be caching search results - why?

In my project we use Lucene 2.4.1 for fulltext search. This is a J2EE project, IndexSearcher is created once. In the background, the index is refreshed every couple of minutes (when the content ...

热门标签