solrj

Adding filter queries (FS) to a soler query using solrj

喜你入骨 提交于 2019-12-13 07:11:47
问题 I am trying to query solr using solrj and I can't seem to find the way to and a fq argument to my code here is the http request I am trying to run select?wt=json&indent=true&fl=name,store&q=*:*&fq=!geofilt%20pt=45.15,-93.85%20sfield=store%20d=5} and here is my code SolrServer server = new HttpSolrServer("the host"); SolrQuery query = new SolrQuery(); query.setQuery( "*" ); query.setParam("fl","name,price"); How do I add the setParam for the fq "!geofilt pt=45.15,-93.85 sfield=store d=5" I

How to upload pdf and update field within one request in solr

北城余情 提交于 2019-12-13 04:13:22
问题 All: I am new to solr and solrj. What I want to do right now is uploading pdf file to solr and set customized field such as last_modified field at same time. But I keep encounter the error such as " multiple values encountered for non multiValued field last_modified", I use solrj to upload pdf and set the last_modified field like ContentStreamUpdateRequest up = new ContentStreamUpdateRequest("/update/extract"); up.setParam("literal.last_modified", "2011-05-19T09:00:00Z"); I guess the error is

Zookeeper timeouts without error in zookeeper Solr

一笑奈何 提交于 2019-12-13 04:13:18
问题 We are facing issue with solr/zookeeper where zookeeper timeouts after 10000ms. Error below. SolrException: java.util.concurrent.TimeoutException: Could not connect to ZooKeeper <server1>:9181,<server2>:9182,<server2>:9183 within 10000 ms. at org.apache.solr.common.cloud.SolrZkClient.<init>(SolrZkClient.java:184) at org.apache.solr.common.cloud.SolrZkClient.<init>(SolrZkClient.java:121) We are not getting any error in zookeeper logs.Except below logs 2018-12-19 04:35:22,305 [myid:2] - INFO

Spring Data Solr: HTTP ERROR 404 when updating Document

心已入冬 提交于 2019-12-13 04:12:25
问题 I am doing a simple Search exercise in solr. I followed this tutorial. http://www.baeldung.com/spring-data-solr I did all same. I run the test case I am getting an error like this: <head> <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/> <title>Error 404 Not Found</title> </head> <body><h2>HTTP ERROR 404</h2> <p>Problem accessing /solr/categories/categories/update. Reason: <pre> Not Found</pre></p> </body> </html> ; nested exception is org.apache.solr.client.solrj.impl

SolrJ addFile keeps documents open

試著忘記壹切 提交于 2019-12-13 03:37:27
问题 I've already submitted a similar question, but I've broken down the problem to its simplest form, so I'm gonna post it again: The problem is, that SolrJ seems to keep file handles open, if I add the same file more than once. I use the following method to submit a document to Solr: public boolean addDocument( File doc ) throws IOException, SolrServerException { ContentStreamUpdateRequest csur = new ContentStreamUpdateRequest( "/update/extract" ); csur.addFile( doc ); csur.setParam( "literal.id

How to create new core in solrj

こ雲淡風輕ζ 提交于 2019-12-13 03:22:39
问题 I am trying to create new core using solrj. I need it to prepare test for my app. I think this code is incomplete or wrong because every time I got a error "no core candidates". package com.itsystems.talentapp.config; import org.apache.solr.client.solrj.SolrClient; import org.apache.solr.client.solrj.SolrServerException; import org.apache.solr.client.solrj.embedded.EmbeddedSolrServer; import org.apache.solr.client.solrj.request.CoreAdminRequest; import org.apache.solr.client.solrj.response

How can I manipulate the multicore in solr dynamically

梦想的初衷 提交于 2019-12-13 01:14:02
问题 I am new to apache solr. I want to manipulate the multicore dynamically using CoreAdminHandler class of org.apache.solr.handler.admin.CoreAdminHandler; There are no tutorials on how to use it nor any good example I could google out. Please give me some example of how can I manipulate multicore which are deployed in tomcat(not embedded) using CoreAdminHandler and solrj. How can I specify the path of my tomcat server where solr is deployed for CoreAdminHandler/coreContainer. And how to specify

Solr stop words replaced with _ symbol

点点圈 提交于 2019-12-12 23:28:38
问题 I have problems with solr stopwords in my autosuggest. All stopwords was replaced by _ symbol. For example I have text "the simple text in" in field "deal_title". When I try to search word "simple" solr show me next result "_ simple text _" but I expect "simple text". Could someone explain me why this works in such way and how to fix it ? Here is part of my schema.xml <fieldType class="solr.TextField" name="text_auto"> <analyzer type="index"> <charFilter class="solr.HTMLStripCharFilterFactory

How to get last Document insert in Solr?

烂漫一生 提交于 2019-12-12 22:58:01
问题 My Problem is.. when I want to get last Document ID in Solr I get 99999999 and last Id = 246458031 I try this How to get last indexed record in Solr? and only work if last ID <= 99999999 2.and when I use timestamp many record have the same date [timestamp": "2017-08-14T08:51:21.185Z] So I need way to get Last Id from Solr EDIT I found Solution [ q=*:*&start=0&rows=1&sort=timestamp+desc,id+desc ] I Sorted by time & ID and it's working So Good 回答1: I found Solution [q= : &start=0&rows=1&sort

Creating collections in SOLR

荒凉一梦 提交于 2019-12-12 11:17:45
问题 On the web searching for collections in SOLR i found only information about distributed search and so on but when I understand the concept of correclty collections are running on the same server instance using the same schema but are logically completely separated. Is this correct? So I can have 3 collections and searching on one collection won´t output results of another right? Would it be possible to search on more than one collection at once? But my main priority: How do I create a second