solr

Solr delete not working for some reason

醉酒当歌 提交于 2019-12-20 08:18:39
问题 Just trying to delete all the documents, and did this: http://localhost:8983/solr/update?stream.body=%3Cdelete%3E%3Cquery%3E*:*%3C/query%3E%3C/delete%3E then committed: http://localhost:8983/solr/update?stream.body=%3Ccommit/%3E I get the response: <lst name="responseHeader"> <int name="status">0</int> <int name="QTime">17</int> </lst> </response> But when I search I still get results back. What did I do wrong? 回答1: Not sure if it matters but you might encode the : too http://localhost:8983

Why is Solr so much faster than Postgres?

社会主义新天地 提交于 2019-12-20 07:58:12
问题 I recently switched from Postgres to Solr and saw a ~50x speed up in our queries. The queries we run involve multiple ranges, and our data is vehicle listings. For example: "Find all vehicles with mileage < 50,000, $5,000 < price < $10,000, make=Mazda..." I created indices on all the relevant columns in Postgres, so it should be a pretty fair comparison. Looking at the query plan in Postgres though it was still just using a single index and then scanning (I assume because it couldn't make use

Is there any workaround for sorting on multiValued field?

北城余情 提交于 2019-12-20 07:47:59
问题 Sorting can be done on the "score" of the document, or on any multiValued="false" indexed="true" field provided that field is either non-tokenized (ie: has no Analyzer) or uses an Analyzer that only produces a single Term (ie: uses the KeywordTokenizer) docs:- http://wiki.apache.org/solr/CommonQueryParameters#sort My original schema is (You can consider the following is a GROUP-BY) :- products (id, unique) users who make some comments(multiValued) last_comment_date for each user (multiValued,

solr tomcat utf-8

我只是一个虾纸丫 提交于 2019-12-20 07:18:42
问题 I have a solr setting with tomcat, and I import data with jdbc from a data base but when I use none-unicode characters after importing the data, when sending the query it dose not recognize the query in the result 回答1: For UTF-8 support on Tomcat with solr you may want to check Why_don.27t_International_Characters_Work.3F URI_Charset_Config 来源: https://stackoverflow.com/questions/9290905/solr-tomcat-utf-8

How to start and Stop SOLR from A user created windows service

我与影子孤独终老i 提交于 2019-12-20 07:12:03
问题 I had a two bat files start.bat and stop.bat for starting and stopping SOLR server manually, Is it possible for me to create a windows serive which will call start.bat on starting the service and also call stop.bat on stopping the sERVICE 回答1: Consider Solr Multicore feature with Tomcat. Each core is like a fully fledged installation, "separate configurations and indexes, with their own config and schema for very different applications, but still have the convenience of unified administration

Lucene search match any word at phrase

放肆的年华 提交于 2019-12-20 06:48:32
问题 i wanna search a string with lots of words, and retrieves documents that matches with any of them. My indexing method is the folowing: Document document = new Document(); document.add(new TextField("termos", text, Field.Store.YES)); document.add(new TextField("docNumber",fileNumber,Field.Store.YES)); config = new IndexWriterConfig(analyzer); Analyzer analyzer = CustomAnalyzer.builder() .withTokenizer("standard") .addTokenFilter("lowercase") .addTokenFilter("stop") .addTokenFilter("porterstem"

Solr return file name

吃可爱长大的小学妹 提交于 2019-12-20 06:29:03
问题 I have indexed a couple of documents using solr, now when I perform a search using the admin interface, it returns search results in the XML format. I am trying to figure out how can I associate a document that I have indexed example: test.pdf with the results that I receive and then serve that document to my user ? Will solr return to me a unique ID of the document that I index, so that after indexing a document I can store the document along with that UID in my database somewhere and then

Update specific field in Solr

╄→尐↘猪︶ㄣ 提交于 2019-12-20 06:20:59
问题 I'm using Solr6.2 and wanna update specific field in a document somewhat like that in relational db: update table_a set field_x = filed_x+1; How to acheive that in Solr? Thanks in advance. 回答1: For this to work you'll need to have all fields set as stored, since you can then use Solr's support for Updating Parts of Documents. You can then use the inc command to increment a field in a document: { "id":"mydoc", "popularity":{"inc":20} } Since internally an update is "retrieve document, change

Apache Solr index upgrade from 4.7 to 5.2

痞子三分冷 提交于 2019-12-20 06:19:49
问题 We are looking to upgrade from Apache Solr 4.7 to ApacheSolr 5.2. upgraded server and run script to upgrade the data index. it is showing below errors. ./upgradeindex.sh -t 5 /home/solr Target version is 5 Downloading http://central.maven.org/maven2/org/apache/lucene/lucene-backward-codecs/4.10.4/lucene-backward-codecs-4.10.4.jar curl: (7) couldn't connect to host Downloading http://central.maven.org/maven2/org/apache/lucene/lucene-backward-codecs/5.5.4/lucene-backward-codecs-5.5.4.jar curl:

solr index for multi-valued multi-type field

ⅰ亾dé卋堺 提交于 2019-12-20 05:51:34
问题 I am indexing a collection of xml document with the next structure: <mydoc> <id>1234</id> <name>Some Name</name> <experiences> <experience years="10" type="Java"/> <experience years="4" type="Hadoop"/> <experience years="1" type="Hbase"/> </experiences> </mydoc> Is there any way to create solr index so that it would support the next query: find all docs with experience type "Hadoop" and years>=3 So far my best idea is to put delimited years||type into multiValued string field, search for all