lucene

ElasticSearch in a runnable jar: lucene problems

白昼怎懂夜的黑 提交于 2020-01-04 06:53:29
问题 I am trying to create a fat executable jar with maven, including elasticsearch as a dependency to create a TransportClient to a running elasticsearch node. From eclipse the client connects just fine to the node, but when I create a jar from the whole project and run that with java -jar bla.jar , the connection fails with: DEBUG - [Armor] adding address [{#transport#-1}{127.0.0.1}{127.0.0.1:9300}] DEBUG - [Armor] connected to node [{#transport#-1}{127.0.0.1}{127.0.0.1:9300}] INFO - [Armor]

Spring Data Neo4j - Argument Type Mismatch

北城余情 提交于 2020-01-04 05:41:13
问题 I used Neo4j 3.0.6, neo4j-ogm 2.0.5, Spring boot starter 1.4.1 RELEASE, Lucene 5.5.2 This is my Machine and machineSectionSummary class (I only post the field, actually there are properties and constructors). When I call updateMachineSectionSummary function, after call this function and relaunch the program, I can't call machineRepository.findByName and get the error below. How can I fix this? I already tried to remove the Date, changing the relationship name, but its not working @NodeEntity

Find total term count in Solr index

妖精的绣舞 提交于 2020-01-04 02:10:26
问题 I need to figure out how many unique terms are in our Solr (Lucene) index. And by unique terms, I dont mean by document. I mean total unique terms from all documents in the index. The Solr admin console shows how many documents, but not total terms. I found a tool called Luke (Lucene Index Toolbox) that will give you that info, but its a UI tool, and my Sorl index is on a Ubuntu server so I cant run it. Any Ideas? 回答1: You can use the LukeRequestHandler. You should see the tag "numTerms" in

Elasticsearch two level sort in aggregation list

余生长醉 提交于 2020-01-03 17:27:31
问题 Currently I am sorting aggregations by document score, so most relevant items come first in aggregation list like below: { 'aggs' : { 'guilds' : { 'terms' : { 'field' : 'guilds.title.original', 'order' : [{'max_score' : 'desc'}], 'aggs' : { 'max_score' : { 'script' : 'doc.score' } } } } } } I want to add another sort option to the order terms order array in my JSON. but when I do that like this : { 'order' : [{'max_score' : 'desc'}, {"_count" : "desc"}, } The second sort does not work. For

An SPI class of type org.apache.lucene.codecs.Codec with name 'Lucene54' does not exist

China☆狼群 提交于 2020-01-03 14:04:25
问题 With lucene-core-5.5.2 i am facing problem a in weblogic server. standalone search application works but when i deploy as WEB APP it is failing with below error Exception type is 'java.lang.ExceptionInInitializerError'. Runtime error: java.lang.IllegalArgumentException: An SPI class of type org.apache.lucene.codecs.Codec with name 'Lucene54' does not exist. You need to add the corresponding JAR file supporting this SPI to your classpath. The current classpath supports the following names: []

elasticsearch / lucene highlight

左心房为你撑大大i 提交于 2020-01-03 09:42:11
问题 I'm using ElasticSearch to index documents. My mapping is: "mongodocid": { "boost": 1.0, "store": "yes", "type": "string" }, "fulltext": { "boost": 1.0, "index": "analyzed", "store": "yes", "type": "string", "term_vector": "with_positions_offsets" } To highlight the complete fulltext I am setting number_of_framgments to 0. If I do the following Lucene-like string query: { "highlight": { "pre_tags": "<b>", "fields": { "fulltext": { "number_of_fragments": 0 } }, "post_tags": "</b>" }, "query":

Multiple Indexes search in Lucene.Net

£可爱£侵袭症+ 提交于 2020-01-03 09:11:33
问题 I have multiple lucene.net indexes that I would need to search on for a query string. So will I need to open a new IndexSearcher on all these indexes or can I achieve this with a single IndexSearcher? Thanks 回答1: It can be accomplished using the MultiSearcher. It implements the Searchable interface over multiple subsearchers. If you only need methods from the Searchable interface it will be just like a regular IndexSearcher to you. If you need to access the underlying searchers that found a

Solr - _version_ field must exist in schema and be searchable

久未见 提交于 2020-01-03 09:05:14
问题 I am pretty new to Solr and getting error on setting up my first example core. I am trying to add new core under admin dashboard but I am receving error about version field. Is there any workaround for this? Background: OS : Windows Solr Folder : C:\solr-6.0.0 Core Admin Url : http://localhost:8984/solr/#/~cores Folder Created For new_core : C:\solr-6.0.0\server\solr\new_core Error : Error CREATEing SolrCore 'new_core': Unable to create core [new_core] Caused by: _version_ field must exist in

How to properly escape OR and AND in lucene query?

我的梦境 提交于 2020-01-03 09:03:40
问题 When I passed in a query "state:OR" lucene gave an error because it considers "OR" as a keyword for boolean clause, but here I actually man the abbreviation of Oregon, the state. I have seen that quoting OR so the query becomes 'state:"OR"' makes it work. but this doesn't sound like a very good approach, since I'll have to do a string substitution for EACH of the keywords that lucene uses: AND OR NOT and others?? I don't how many I tried directly constructing the query instead of doing

How to update bigger solr index efficiently

和自甴很熟 提交于 2020-01-03 06:21:09
问题 I have a larger Solr index size. The index contains 3 million documents. I need to update some documents frequently. But each time Solr commit takes some time since the index contains millions of documents. And each commit opens a new searcher. So it takes some time to perform search for first time. Is there any way to update the documents in an efficient manner? Thanks in advance. 回答1: You can check for Solr 4 soft commits which would make the indexing faster. The new documents would be