solr

Understing some concepts of apache solr

浪尽此生 提交于 2020-01-06 20:01:32
问题 I am new to Apache solr, can someone please explain the meaning of following terms with examples :- Solr Core Solr Collection Logical vs Physical index Sharding I went through various blog posts but i am not able to understand. 回答1: The terminology is used a bit haphazardly, so you'll probably find texts that use a few of these terms interchangeably. Solr core A core is a named set of documents living on a single server. A server can have many cores. The core can be replicated to other

Best Solr model when searching inside multivalued fields

Deadly 提交于 2020-01-06 14:06:07
问题 I have the following model for a type of document in Solr 5: 1 document per entity entity has about 100 single valued attributes entity has 1 multi valued attribute uuids_scores , which contains a value like "123_456", being the first part (123) the user id and the second part (456) a stored score I keep for each user. an entity can have about 100 k uuids_scores values. The way I am trying to use this is: I search for entities where uuids_scores:123_* and I get the list of entities I want.

Uncaught SyntaxError: Unexpected token < in solr

流过昼夜 提交于 2020-01-06 07:58:07
问题 I am trying to add a new document in the solr server. My Code $.ajax({ type: "POST", url: "http://192.168.10.113:8080/solr/update/json?commit=true", data: { "add": { "doc": { 'id': '19990' } } }, dataType: 'jsonp', crossDomain: true, jsonp: 'json.wrf', success: function (data) { alert(data); }, failure: function (errMsg) { alert(errMsg); } }); My Solr server is hosted in different domain so i wrote dataType: 'jsonp', crossDomain: true, jsonp: 'json.wrf', to over come from cross domain problem

Uploading nested JSON objects to Solr

南笙酒味 提交于 2020-01-06 07:41:15
问题 I'm trying to send my inline JSON file to my Solr Database, but I'm having a problem with my nested objects. I have two nested objects inside my _source object which are media_gallery and stock . Before my upload used to crash, but I managed to upload it after a few corrections, but my media_gallery and stock are added as separate objects therefore instead of having the original 1000 objects I get 3000 objects in my Solr DB after my upload. I'm currently using this command to upload my JSON

Uploading nested JSON objects to Solr

二次信任 提交于 2020-01-06 07:41:07
问题 I'm trying to send my inline JSON file to my Solr Database, but I'm having a problem with my nested objects. I have two nested objects inside my _source object which are media_gallery and stock . Before my upload used to crash, but I managed to upload it after a few corrections, but my media_gallery and stock are added as separate objects therefore instead of having the original 1000 objects I get 3000 objects in my Solr DB after my upload. I'm currently using this command to upload my JSON

Elastic Search equivalent of “Scoping (Scalar Fields)” in sunspot/solr

本小妞迷上赌 提交于 2020-01-06 07:15:35
问题 I'm exploring various options for a search engine for our rails-app/data. I was able to make sunspot/solr work and am currently exploring ElasticSearch as an alternative but couldn't get the same thing(scoping/filtering) to work under ES. I would like to filter/scope objects as described in the "Scoping" section in 'https://github.com/sunspot/sunspot'. I have an active record class 'Product'. class Product < ActiveRecord::Base ... include Tire::Model::Search include Tire::Model::Callbacks

Solr remove ranking or modify ranking feature

佐手、 提交于 2020-01-06 05:36:09
问题 I want to optimise my Solr engine. I don't want ranked results. I just want all docs which match my query is there any way I can remove it . So that retrieving data improves ? 回答1: There is no need to remove relevancy ranking to achieve what you want. By setting the rows parameter to the same number as the numfound you will retrieve all documents matching your query. http://url-to-some-server/solr/select?q=somequery&rows=200 if you want the documents sorted in another way than by relevance,

Updating Solr field while posting .pdf document in Windows

旧时模样 提交于 2020-01-06 03:16:05
问题 I want to post and index a PDF document while also updating a custom field I created. Basically, I want users to be able to enter tags before they upload a document. I added a multiValued "tags" field to my managed-schema file: <field name="tags" type="string" multiValued="true" indexed="true" required="true" stored="true"/> I have tried the curl commands for posting data, but they do not work for me. So far, this is the only command that I can post with that works: java -Dauto -Dc=NameOfCore

Search different tokens on different fields in Solr

对着背影说爱祢 提交于 2020-01-06 02:36:10
问题 I'd like to write a custom tokenizer in Apache Solr 3.6, that will try to identify certain types of tokens and depending on their type search on different fields. For example, if the search were for 2in screw , I would have the custom tokenizer identify that 2in refers to a value and unit of measure and that screw refers to a category. I would then want to limit the search to "in" in the measure field and "screw" in the category field. I realize that this can be done be externally breaking

solr - set fields as default search field - Using EdisMax

对着背影说爱祢 提交于 2020-01-05 10:28:44
问题 The following query works well for me http://...:8983/solr/vault/select?q=White&defType=edismax&qf=VersionComments+VersionName returns all the documents where version comments includes White I try to omit the qf containing the fields names : In solr config I write <requestHandler name="/select" class="solr.SearchHandler"> <!-- default values for query parameters can be specified, these will be overridden by parameters in the request --> <lst name="defaults"> <str name="echoParams">explicit<