solr

Solr - highlight query phrase

二次信任 提交于 2019-12-21 17:01:39
问题 Is it possible to highlight whole query terms? f.e. when I ask for "United States" I want to get: <em>United States</em> and not: <em>United</em> <em>States</em> I've searched the whole Internet for an answer, used all combinations of hl.mergeContiguous , hl.usePhrasesHighlighter and hl.highlightMultiTerm parameters and still cannot make it work. my query is: http://localhost:8983/solandra/idxPosts.proj350_139/select?q=post_text:"Janusz Palikot"&hl=true&hl.fl=post_text&hl.mergeContiguous=true

Django/python and Apache Solr: pysolr or solrpy?

纵饮孤独 提交于 2019-12-21 17:01:17
问题 brand new on this forum and this is my first post! At work we're starting a project which uses Apache Solr and i'm in charge of the frontend system (Django-based). Our solr database isn't related to any other db engine nor to any models' class, so Haystack isn't good for us (since its strictly related to the models). I was looking at http://code.google.com/p/pysolr/ and http://code.google.com/p/solrpy/ Basically, they're similar. I like more solrpy, since it uses POST requests and we can mask

how can I limit by score before sorting in a solr query

流过昼夜 提交于 2019-12-21 12:49:11
问题 I am searching "product documents". In other words, my solr documents are product records. I want to get say the top 50 matching products for a query. Then I want to be able to sort the top 50 scoring documents by name or price. I'm not seeing much on how to do this, since sorting by score, then by name or price won't really help, since scores are floats. I wouldn't mind if I could do something like map the scores to ranges (like a score of 8.0-8.99 would go in the 8 bucket score), then sort

Solr doesn't overwrite - duplicated uniqueKey entries

て烟熏妆下的殇ゞ 提交于 2019-12-21 12:28:21
问题 I have a problem with Solr 5.3.1 . My Schema is rather simple. I have one uniqueKey which is the "id" as string. indexed, stored and required, non-multivalued. I add documents first with a "content_type:document_unfinished" and then overwrite the same document, with the same id but another content_type:document. The document is then twice in the index. Again, the only uniqueKey is "id", as string. The id is coming originally from a mysql-index primary int. Also looks like this happens not

How to boost fields in solr

夙愿已清 提交于 2019-12-21 12:13:55
问题 I already have the boost determined before hand. I have a field in the solr index called boost1 . This boost field will have a value from 1 to 10 similar to google PR rank. This is the boost that should be applied to every query ran in solr. here are the fields in my index Id Title Text Boost1 The boost field should be apply to every query. I am trying to implement functionality similar to Google PR rank. Is there a way to do this using solr? 回答1: you can add the boost during query e.g. q={

Solr Query with LIKE Clause

谁都会走 提交于 2019-12-21 10:32:53
问题 I'm working with Solr and I'd like to know if it is possible to have a LIKE clause in the query. For example, I want to know all organizations with "New York" in the title. In SQL, this would be written like Name LIKE 'New York%'. My question - how do you write a LIKE query in Solr? I'm using the SolrNet library, if that makes a difference. 回答1: You just search for "New York", but first you need to properly configure your field's analyzer. For example you might want to start with a field type

Is it possible to set a Solr Score threshold 'reasonably', independent of results returned? (i.e. Is Solr Scoring standardized in any way)

≯℡__Kan透↙ 提交于 2019-12-21 09:39:14
问题 I have a Solr index with many entries, and upon query some subset is returned - each entry having some score, (Obvious). Once the results are returned with scores, I want to be able to only "keep" results that are above some score (i.e. results of a certain quality only). Is it possible to do this when the returned subset could be anything? I ask because it seems like on some queries a score of say 0.008 is resulting in a decent match, whereas other queries a higher score results in a poor

Solr 4 Adding Shard to existing Cluster

本秂侑毒 提交于 2019-12-21 06:22:32
问题 Background: I just finished reading the Apache Solr 4 Cookbook. In it the author mentions that setting up shards needs to be done wisely b/c new ones cannot be added to an existing cluster. However, this was written using Solr 4.0 and at the present I am using 4.1. Is this still the case? I wish I hadn't found this issue and I'm hoping someone can tell me otherwise. Question: Am I expected to know how much data I'll store in the future when setting up shards in a SolrCloud cluster? I have

Solr: Multi-word synonyms

妖精的绣舞 提交于 2019-12-21 05:56:36
问题 I'm developing a set of synonyms, where you can find some multi-word expressions, such as: black berry => blackberry At the analysis stage, and using the /admin/analysis.jsp tools, I can see that the results are correct. A query such as "quiero una black berry" returns the following sequence: The org.apache.solr.analysis.StandardTokenizerFactory {luceneMatchVersion=LUCENE_36}: position 1 2 3 4 term text quiero una black berry startOffset 0 7 11 17 endOffset 6 10 16 22 type <ALPHANUM>

Solr: Multi-word synonyms

做~自己de王妃 提交于 2019-12-21 05:56:16
问题 I'm developing a set of synonyms, where you can find some multi-word expressions, such as: black berry => blackberry At the analysis stage, and using the /admin/analysis.jsp tools, I can see that the results are correct. A query such as "quiero una black berry" returns the following sequence: The org.apache.solr.analysis.StandardTokenizerFactory {luceneMatchVersion=LUCENE_36}: position 1 2 3 4 term text quiero una black berry startOffset 0 7 11 17 endOffset 6 10 16 22 type <ALPHANUM>