solr

autocomplete in Solr and sunspot

微笑、不失礼 提交于 2019-12-12 04:33:19
问题 I'm building a website with RoR and I use Sunspot and the solr Search Engine. I needed to use autocomplete functionality but I couldn't. I knew that Solr has a new thing called suggester but I don't know how to use this with sunspot and in a rails app. I found a gem called sunspot_autocomplete and I followed what was written, but when I try to reindex I get this error : rake aborted! RSolr::Error::Http - 400 Bad Request Error: ERROR:unknown field 'tags_ac' The model that is searchable called

Solr DIH with multi value fields and faceting

浪子不回头ぞ 提交于 2019-12-12 04:31:49
问题 I’ m using Solr to index a dataset stored in DBMS using SQL DIH. One on the table use a n-to-n relationship. Just for sake of simplicity (my app is much more complex than this) here is an example of the application: a person has a name and it has associated 0..n roles (a role is described by a role_name string). Table Person: - id: int - Name: string Table roles - id: int - role_name: string Table association - id_person: int - id_role: int Two persons could be described as: id=1, name=John

How to register a ISolrFieldSerializer in Windsor container so that SolrNet can pick it up

亡梦爱人 提交于 2019-12-12 04:13:55
问题 I am trying to get an enum to serialize to it's int value when posting to Solr. So I have implemented a ISolrFieldSerializer to do this, As suggested here. But I can seem to register it within the Windsor container in a way that it then gets used by SolrNet Here is what I have: This works fine apart from the serializer does not get used, although it appears in the containers components list. Any ideas? container.Register(Component.For<ISolrFieldSerializer>().ImplementedBy<SolrEnumSerializer>(

Efficiency aspect of delta import in solr

吃可爱长大的小学妹 提交于 2019-12-12 04:11:37
问题 I have data of about 2100000 rows. The time taken for full-import is about 2 minutes. For any updates in table I'm using delta import to index the updates. The time taken for delta import is 6 minutes. Considering the efficiency aspect it is better to do full import rather than delta import. So, what is the need of delta import? Is there any better way to use delta import to increase it's efficiency? I followed the steps in documentation. data-config.xml <dataConfig> <dataSource type=

How to update data in SOLR?

你说的曾经没有我的故事 提交于 2019-12-12 04:09:50
问题 Hi I have a SOLR collection named AssetLocalUS which contains this data. [ { "assetId": "1-213Z-9335", "availability": 1 }, { "assetId": "1-213Z-1789", "availability": 2 }, { "assetId": "1-213Z-3452", "availability": 3 } ] I want to update availability based on AssetId '1-213Z-9335' in SOLR. This is my JAVA code. private SolrCrudRepository<Asset, String> assetRepository; @Autowired private AssetEntityRepository assetEntityRep; @Autowired public AssetRequestServiceImpl(SolrCrudRepository<Asset

Using Minim Match and Bq in SOLR

橙三吉。 提交于 2019-12-12 04:08:30
问题 I wonder if when using the Bq Parameter, one should take into account what is put in it, in the minimum match clause. In other words: 1 - I have bq=type:Work^5, which search in the type field, while fq does not contain type. My user search query do not search in type. It searches in other field, but i try to boost, prioritize result by how important is the type of document. 1.1 => I have the feeling that this is another clause that match and therefore, my normal minimum match should take into

Why Solr query not working on whitespaces?

冷暖自知 提交于 2019-12-12 03:58:52
问题 I am a beginner in Solr , I have the following collection in my Soleserver indexed : { "id": "book5", "title": [ "Five point someone" ], "author": "Chetan Bagat", "genere": "fantasy", "description": [ "An iit guide" ], "comments": [ "good", "excellent" ], "publications": [ "swapnapublications", "pb publications" ] } and { "id": "book1", "title": [ "nightatcallcenter" ], "author": "ChetanBagat", "genere": "fiction", "description": [ "Aniitguide" ], "comments": [ "good", "excellent" ],

Solr query not working properly

女生的网名这么多〃 提交于 2019-12-12 03:58:05
问题 I don't know what is going wrong. This is actually a very simple query which is not working in my Solr Search. http://IP_ADDRESS/solr/CORE_NAME/select?indent=on&q=Bangalore&wt=json There are more than 100 records which contains the word Bangalore in my database. However the the results contain just 2 records. Is there anything that needs to be corrected in the schema or configuration. Can i get some quick help in this? Thanks. EDIT 1: My Filter Query below for works perfectly. http://IP

Rails3 SOLR sort order using a child field

邮差的信 提交于 2019-12-12 03:45:27
问题 I have a working search using SOLR in a Rails 3 app. My controller returns results in pubdate order. I am trying to sub-order by the Section.name. How can I add the child field to the order-by syntax? Here is my code: @stories = Story.search do paginate(:page => params[:page]) order_by :pubdate, :desc order_by :section_id <---want to suborder by Section.name fulltext params[:search_query] end 回答1: You would need to add the section name to the parent field to be able to sort it using the

curl: (3) [globbing] bad range specification in column 3

荒凉一梦 提交于 2019-12-12 03:38:35
问题 Im trying to index a simple json data in solr using curl. When i use the command, it says "curl -X POST -H 'Content-Type:application/json'-d http://localhost:8983/solr/informationretrieval/update/json/docs '[{"id":"1","title":"Doc 1"},{"id":"2","title":"Doc 2"}]' {"responseHeader":{"status":0,"QTime":1}} curl: (3) [globbing] bad range specification in column 3" I have tried removing quotes, tried -g and --globoff etc but every time there are errors like illegal port number. Can anyone please