solr

Good way to do multi-word synonym search

蹲街弑〆低调 提交于 2019-12-13 06:59:26
问题 All: I want to do a multi-word synonym search, to get search to work like: "small dog" means puppy "cute small cat" may refer to kitten [1] I do not know how to define those multi-word phrase in synonyms.txt to make it work. Could anyone ell me how to define those phrase in synonyms.txt [2] Another thing is: Once the synonym can work, how can I match both "small dog" and "little dog" which have similar meaning with puppy? Like: "a small dog" also means "small dog" means puppy "cute cat" may

Solr AND operator not working

我的未来我决定 提交于 2019-12-13 06:19:55
问题 http://localhost:8080/products/select?indent=on&q=text:30MM X 533MM Abrasives&fl=*,[docid] returns docid 187095 http://localhost:8080/products/select?indent=on&q=textfields:30MM X 533MM Abrasives&fl=*,[docid] returns docid 187095 http://localhost:8080/products/select?indent=on&q=textfields:30MM X 533MM Abrasives AND text:30MM X 533MM Abrasives&fl=*,[docid] returns no result. Am I not applying AND correctly ? 回答1: If you use fielded data in your query and you don't use double quotes ("), the

Why is solr returning result with only exact search?

怎甘沉沦 提交于 2019-12-13 06:00:01
问题 I have created a core, secondCore{id, resid, title, name, cat, role, exp} Consider a sample data: {"id" : "11","resid" : 384,"title" : "perl and java developer","name" : "appnede new name","cat" : "22,11","role" : "new role","exp" : 1 } . When I search for title:perl , I get 0 result. I get mentioned result, only if I search for title:"perl and java developer" or title:perl* . Response: <response> <lst name="responseHeader"> <int name="status">0</int> <int name="QTime">2</int> <lst name=

Splitting database column into multivalued Solr field

泪湿孤枕 提交于 2019-12-13 05:59:07
问题 I'm going nuts trying to figure out how to get the Data Import Handler's splitBy construct to work. I was expecting it to split the input column into a multivalued field. Here's a test case to reproduce the problem: import java.io.File; import java.io.IOException; import java.sql.SQLException; import static org.junit.Assert.*; import javax.sql.DataSource; import org.apache.commons.dbutils.QueryRunner; import org.apache.commons.io.FileUtils; import org.apache.solr.client.solrj.SolrQuery;

Use one Solr instance for two Rails apps

試著忘記壹切 提交于 2019-12-13 05:48:59
问题 I have a server set up with several Rails apps, two of which are using Solr Sunspot. However, Solr is returning irrelevant results for a given search, and I believe the problem boils down to not having separated Solr/Sunspot to handle two Rails apps. I have this in one app: class Article < ActiveRecord::Base searchable do text :title, :boost => 2.0 text :body do strip_tags body end time :created_at end end and this in the other: class Article < ActiveRecord::Base searchable do text :title,

Solr copy data from “crawler” core into “search” core

倾然丶 夕夏残阳落幕 提交于 2019-12-13 05:48:08
问题 We are looking to have a Solr 4.9 setup where we have a very simple crawler wipe out and load up a "crawler" core then trigger a copy of the data over to "search" core when the crawl is done. The purpose of this is that our crawler is VERY simple, and doesn't really track documents in a way that would be conducive to doing updates and deleted. Basically, the crawler will be wiping out the entire "crawler" core, ripping though about 50k documents (committing ever 1000 or so), and then trigger

solr multiple tokenizers for query

南笙酒味 提交于 2019-12-13 05:40:17
问题 I am rather new to SolR. I would like to use multiple tokenizers. I am using the standard tokenizer so that words get split via \t, space, comma, etc. Now I would like to use an additional tokenizer. If there is the word "cowshed" I would like it to become "cow" and "shed". There are only I few words which are common to the search index which I would like to split. Therefore I planned using the regex tokenizer. However I get an error message when I try to ("multiple tokenizers at xml root").

How much work is involved adding AJAX section in an existing MVC3 app?

孤人 提交于 2019-12-13 05:38:02
问题 I have an application where it search images that are stored in the database and displays the result (with pagination). Currently every time the next page is loaded our whole site is reloaded. Hence, our site is noticeably sluggish. I was looking into iStockPhoto and see that only the images content is loaded and their performance is much better than mine. I am using Solr (which to me seems slow.. anything I'm missing? I thought Solr is supposed to be quick. Haha) to store and retrieve images

Does solr 4.6.1 work with php5?

你说的曾经没有我的故事 提交于 2019-12-13 05:37:26
问题 In the documentation of php-Apache Solr PHP extension, it is mentioned that "It is compatible with both versions 1.3 and 1.4 of Apache Solr." Does this mean that it isn't compatible with the newer versions? 回答1: UPDATE: PECL Apache Solr extension 2.0.0b is now available at http://pecl.php.net/package/solr The 2.x series are only for Apache Solr 4.x Well, There are several incompatibilities with Solr Server 4.0 like commit/optimize parameters have changed + other incompatibilities. We are

Regex multiple matches and $1, $2 variables (quick and easy!)

雨燕双飞 提交于 2019-12-13 05:35:18
问题 I need to extract numeric values from strings like "£17,000 - £35,000 dependent on experience" ([0-9]+k?[.,]?[0-9]+) That string is just an example, i can have 17k 17.000 17 17,000 , in every string there can be 0,1 or 2 numbers (not more than 2), they can be everywhere in the string, separated by anything else. I just need to extract them, put the first extracted in a place and the second in another. I could come up with this, but it gives me two matches (don't mind the k?[,.] , it's correct