solr

Solr filter query including NOT and OR

我们两清 提交于 2019-12-12 08:48:44
问题 For a filter query in Solr, I need to include all documents not of a certain type, plus any documents of that type which have a value in a certain field. I tried this: fq=(-type_id:(A) OR content:(['' TO *])) But it is excluding documents of type_id B, C, etc. which have null content . ( type_id is a string field and content is text .) I have seen this question: Complex SOLR query including NOT and OR and this post about operators: http://robotlibrarian.billdueber.com/2011/12/solr-and-boolean

how to filter search by values that are not available

十年热恋 提交于 2019-12-12 08:28:57
问题 I have a list of items as: i = SearchQuerySet().models(Item) now, each item in i has a attribute, price I want to narrow the result in which price information is not available along with the ones falling in a given range something like i.narrow('price:( None OR [300 TO 400 ] )') how can that be done? 回答1: Try this: -(-price:[300 TO 400] AND price:[* TO *]) is logically the same and it works in Solr. 回答2: As per the SolrQuerySyntax Pure Negative Queries: -field:[* TO *] finds all documents

How to import data from mysql to solr

女生的网名这么多〃 提交于 2019-12-12 07:23:56
问题 I am trying to do the full db import using below URL `127.0.0.1:8983/solr/dataimport?command=full-import` I installed solr and trying to configure it. I changed few files and putted details (file names and added code is described below). But when I am trying to import the table data into solr json format it is showing below error: HTTP ERROR 404 Problem accessing /solr/dataimport. Reason: Not Found Powered by Jetty:// Can anyone let me know what the actual problem is? Or did I misconfigure

daemon for solr

╄→гoц情女王★ 提交于 2019-12-12 07:12:44
问题 I would like to run solr with daemon. I saw in another post there is a init.d script you can run but it seems to have problems in my ubuntu environment. whenever i try to run the script with /etc/init.d/solr start or when i try to run the below line manually: daemon java -jar start.jar it errors: daemon: invalid option -- 'j' Any ideas? thx. 回答1: Below is a working script for daemonizing Solr. Couple important notes here: You need to set the chdir for the daemon script or else you'll get

Solr delta import Query exception

人盡茶涼 提交于 2019-12-12 06:22:32
问题 THis is my db configuration file , I am able to full import properly but getting problem to delta import there is two exception datasource exception related to mysql DHI <dataConfig> <dataSource driver="com.mysql.jdbc.Driver" url="jdbc:mysql://10.30.2.32:3306/artemis" batchSize="-1" user="username" password="password" /> <document> <entity name="job" pk="job_id" query="SELECT * FROM job" deltaImportQuery="SELECT * FROM job WHERE job_id = '${dataimporter.delta.id}'" deltaQuery="SELECT job_id

Matching elasticsearch data indexed by Titan

落爺英雄遲暮 提交于 2019-12-12 06:12:22
问题 I have indexed titan data in elasticsearch, it worked fine and indexed but when i see the data in elasticsearch using REST API. the column/property name looks different than from Titan. For example i have indexed age while inserting data to Titan final PropertyKey age = mgmt.makePropertyKey("age").dataType(Integer.class).make(); mgmt.buildIndex("vertices",Vertex.class).addKey(age).buildMixedIndex(INDEX_NAME); and if i see same in elasticsearch { "_index" : "titan", "_type" : "vertices", "_id"

Phonetic filter factory for Hindi

a 夏天 提交于 2019-12-12 05:51:44
问题 I am working with Apache solr ,I am trying to use phonetic filter factory , I have tried all the encoders that are available with solr.PhoneticFilterFactory but none of them is supporting indian languages . Is there any other Filter/Method available so that i can get phonetic representation for indian languages e.g Hindi,tamil,Bengali etc If not then how we can modify existing filters to support these languages. 回答1: Have you tried the new Beider Morse Filter Factory, which was just added in

Solrcloud- does it matter if I have even or odd number of shards?

你离开我真会死。 提交于 2019-12-12 05:47:40
问题 I had a few queries on choosing exact number of shards for collection and nodes in cloud- is there any impact on search/ingestion, if I choose even or odd number of shards? is there any thumb rule or guidelines for deciding number of shards and nodes in cloud? It would be really helpful if you could provide suggestions to plan solrcloud, collection(#shards) for below requirement: Data type: structured Expected data load: 3 TB Ingestion Strategy: 2 MM records( INSERT/UPDATE/DELETE requests) in

Solr : existing index

懵懂的女人 提交于 2019-12-12 05:41:36
问题 I work with solr to index some data. I need to check existing index before start another index. Is there any command to check existing index with solr? Thanks! 回答1: If you want to explore content of the index, you can use Luke which you can download in github : https://github.com/DmitryKey/luke/releases 来源: https://stackoverflow.com/questions/28882522/solr-existing-index

Solr sort by the value of function query does not work

左心房为你撑大大i 提交于 2019-12-12 05:37:23
问题 I'm working on a feature which relies on sorting the value of function query. Function query is as below : http://localhost:8983/solr/collection/select?q=*:*&sort=if(exists(f1_t), f1_t, theme)+ASC&wt=json&indent=true The sort function is " if(exists(f1_t), f1_t, theme) ASC " So basically what I'm doing is if the field " f1_t " (which is a dynamic field of type TextField) exists then the sorting is based on the value of the field else the sorting is based on the value of "theme" which is also