lucene

Lucene integration with EclipseLink

 ̄綄美尐妖づ 提交于 2019-12-20 03:51:14
问题 I am trying to use Lucene with EclipseLink, and was wondering if there are any good integration libraries out there? I have seen solar-flare, and it looks lime it might do what I want, but it's out of date (although i have an older version of EclipseLink, I am using 4.10 of Lucene) That may work, but I cant find any documentation, examples or tutorials on how to use it. Any advice would be appreciated (I dont believe we can switch to Hibernate either) Thanks in advance 回答1: If you are ready

Highlighting whole sentence in Lucene.net 2.9.2

一世执手 提交于 2019-12-20 03:49:11
问题 Currently I'm working with the Lucene.net 2.9.2 framework. As a result of my search I would like to achieve result page (asp.net) with highlighted text fragment. I would like that the selected fragment is a whole sentence and not only few words. For example if I have text: Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo

how to use a multiphrasequery?

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-20 03:44:46
问题 http://lucene.apache.org/java/2_3_1/api/core/org/apache/lucene/search/MultiPhraseQuery.html for the example "Microsoft app*", he says use IndexReader.term() but that returns TermEnum , how do I put it in MultiPhraseQueryParser ? Edit : Or someone tell me how do I do a search on Microsoft app* in a better way over a 7.5 GB index!! 回答1: You need to iterate on TermEnum to get the terms. You can iterate on the TermEnum to get terms starting with "app" as follows. TermEnum te = reader.terms(new

How to improve a single character PrefixQuery performance?

这一生的挚爱 提交于 2019-12-20 03:41:22
问题 I have a RAMDirectory with 1.5 million documents and I'm searching using a PrefixQuery for a single field. When the search text has a length of 3 or more characters, the search is extremely fast, less than 20 milliseconds. But when the search text has a length of less than 3 characters, the search might take even a full 1 second. Since it's an auto complete feature and the user starts with one character (and there are results that are indeed 1 char length), I cannot restrict the length of the

Lucene 4.2 StringField

北城余情 提交于 2019-12-20 02:54:46
问题 I'm new to Lucene. I have two documents and I would like to have an exact match for the document field called "keyword" (the field may occur multiple times within a document). The first document contains the keyword "Annotation is cool". The second document contains the keyword "Annotation is cool too". How do I have to build the query such that only the first document is found, when I search for "Annotation is cool"? I read something about "StringField" and that it is not tokenized. If I

Full text search in Neo4j with spaces

穿精又带淫゛_ 提交于 2019-12-20 02:42:29
问题 When the neo4j lucene auto index is in exact mode (which is the default) queries of the type: start n=node:node_auto_index('name:asfd\\ a*') return n Work correctly (assuming you have a node with the name asdf adsf for instance. However when switching the index to "fulltext" mode following these instructions (including deleting the index and reassigning the indexed property), then the same query doesn't return any results. Original Question Trying to search neo4j via the full text index when

Is it possible to run several map task in one JVM?

醉酒当歌 提交于 2019-12-20 02:35:16
问题 I want to share large in memory static data(RAM lucene index) for my map tasks in Hadoop? Is there way for several map/reduce tasks to share same JVM? 回答1: Jobs can enable task JVMs to be reused by specifying the job configuration mapred.job.reuse.jvm.num.tasks. If the value is 1 (the default), then JVMs are not reused (i.e. 1 task per JVM). If it is -1, there is no limit to the number of tasks a JVM can run (of the same job). One can also specify some value greater than 1 using the api. 回答2:

Solr requests time out during index update. Perhaps replication a possible solution?

主宰稳场 提交于 2019-12-20 02:32:41
问题 We are running a Solr installation (everything standard jetty environment, just added some fields to schema). The index is about 80k Documents that are of average size (probably 20 fields with about 100 characters each). The problem is that from time to time some requests time out. Well they dont time out server side but they take longer than 10 seconds which is when our application considers it as a time out. They are very simple queries that usually dont take longer than 80 ms or something.

Elasticsearch field name aliasing

眉间皱痕 提交于 2019-12-19 22:04:56
问题 Is it possible to setup alias for field names in elasticsearch? (Just like how index names can be aliased) For example: i have a document {'firstname': 'John', 'lastname': 'smith'} I would like to alias 'firstname' to 'fn'... 回答1: Just a quick update, Elasticsearch 6.4 came up with feature called Alias Datatype . Check the below mapping and query as sample. Note that the type of the field is alias in the below mapping for fieldname fn Sample Mapping: PUT myindex { "mappings": { "_doc": {

Elasticsearch field name aliasing

▼魔方 西西 提交于 2019-12-19 22:03:06
问题 Is it possible to setup alias for field names in elasticsearch? (Just like how index names can be aliased) For example: i have a document {'firstname': 'John', 'lastname': 'smith'} I would like to alias 'firstname' to 'fn'... 回答1: Just a quick update, Elasticsearch 6.4 came up with feature called Alias Datatype . Check the below mapping and query as sample. Note that the type of the field is alias in the below mapping for fieldname fn Sample Mapping: PUT myindex { "mappings": { "_doc": {