synonym

Elasticsearch synonym analyzer not working

回眸只為那壹抹淺笑 提交于 2019-12-05 19:56:06
问题 EDIT: To add on to this, the synonyms seem to be working with basic querystring queries. "query_string" : { "default_field" : "location.region.name.raw", "query" : "nh" } This returns all of the results for New Hampshire, but a "match" query for "nh" returns no results. I'm trying to add synonyms to my location fields in my Elastic index, so that if I do a location search for "Mass," "Ma," or "Massachusetts" I'll get the same results each time. I added the synonyms filter to my settings and

Training solr to recognize nicknames or name variants

被刻印的时光 ゝ 提交于 2019-12-05 06:34:49
问题 I'm pretty sure that solr can be set up to recognize synonyms during searches. I'm wondering if it's possible to do the same with nicknames -- so for example searches for "Robert" would pull up records with "Bob" in them. 回答1: Just found a page where someone named Jon Moniaci exactly how to do this: http://bitsandpieces.jonmoniaci.com/2010/05/searching-common-nicknames-in-solr/ Basically, create a synonyms file with lines like so: Bob, Robert, Bobby (Jon's file is here, derived from the

Multi-word synonym search in Solr

廉价感情. 提交于 2019-12-04 17:21:11
I'm trying to use a synonym filter to search for a phrase. peter=> spider man, spiderman, Mary Jane, ..... I use the default configuration. When I put these synonyms into synonym.txt and restart Solr it seems to work only partially: It starts to search for "spider" , "man" , "spiderman" , "Mary" and "Jane" but what I want to search for are the meaningful combinations - like "spider man" , "Mary Jane" and "spiderman" . Yes sadly this is a well known problem due to how the Solr query parser breaks up on whitespace before analyzing. So instead of seeing "spider" before "man" in the token stream,

Trying to find synonyms using wordnet java api

让人想犯罪 __ 提交于 2019-12-04 10:03:25
I am trying to find synonyms of some words(String type) in java using Wordnet java api. I have difficulties though in figuring out how it works. I found this link http://lyle.smu.edu/~tspell/jaws/doc/edu/smu/tspell/wordnet/impl/file/ReferenceSynset.html#getTagCount%28java.lang.String%29 which I though it is useful, but still I don't know how to start. Do I have to create a ReferenceSynset object and then find its synonyms, and how can this be done? Or is there another easier way? Please help! Thanks in advance! JAWS - "Java API for WordNet Searching" has been created exactly for this purpose.

How can I check if the table behind a synonym exists

流过昼夜 提交于 2019-12-04 07:59:23
I'm trying to create a simple script to dump the results of a complex view out into a table for reporting. I have used synonyms to simplify tweaking the view and table names. The idea is that the user of the script can put the name of the view they want to use as the source, and the name of the target reporting table in at the start and away they go. If the table doesn't exist then the script should create it. If the table already exists then the script should only copy the records from the view which aren't already in the table over. The script below covers all those requirements, but I can't

Elasticsearch synonym analyzer not working

喜夏-厌秋 提交于 2019-12-04 02:51:51
EDIT: To add on to this, the synonyms seem to be working with basic querystring queries. "query_string" : { "default_field" : "location.region.name.raw", "query" : "nh" } This returns all of the results for New Hampshire, but a "match" query for "nh" returns no results. I'm trying to add synonyms to my location fields in my Elastic index, so that if I do a location search for "Mass," "Ma," or "Massachusetts" I'll get the same results each time. I added the synonyms filter to my settings and changed the mapping for locations. Here are my settings: analysis":{ "analyzer":{ "synonyms":{ "filter":

Solr: Multi-word synonyms

∥☆過路亽.° 提交于 2019-12-03 20:28:42
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> <ALPHANUM> <ALPHANUM> <ALPHANUM> The org.apache.solr.analysis.SynonymFilterFactory {synonyms=lang/synonyms_es

SQL Server - Synonyms Tips & Tricks? [closed]

余生长醉 提交于 2019-12-03 15:37:44
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 7 years ago . I've been doing a lot of DB refactoring lately and synonyms have come in incredibly useful. When I originally put in the synonyms I

Is there way to boost original term more while using Solr synonyms?

烂漫一生 提交于 2019-12-03 12:16:48
问题 For example I have synonyms laptop,netbook,notebook in index_synonyms.txt When user search for netbook I want to boost original text more then expanded by synonyms? Is there way to specify this in SynonymFilterFactory? For example use original term twice so his TF will be bigger 回答1: As far as I know, there is no way to do this with the existing SynonymFilterFactory. But following is a trick you can use to get this behavior. Let's say your field is called title . Create another field which is

When should database synonyms be used?

自闭症网瘾萝莉.ら 提交于 2019-12-03 08:17:25
问题 I've got the syntax down but I'm wondering if somebody can provide an illustrative use case where database synonyms are very useful. 回答1: It is excellent for staging mock tables when testing. For example, if your source tables contain millions of records and you want to test a small subset of data, you can use synonyms to re-direct the source table to a smaller table you control so you can stage various scenarios. In this way, you can update/delete the data in the mock table without affecting