You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by "Erick Erickson (Jira)" <ji...@apache.org> on 2020/08/28 11:39:00 UTC

[jira] [Resolved] (SOLR-14785) Update synonyms by API and reload collection in Solr

     [ https://issues.apache.org/jira/browse/SOLR-14785?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Erick Erickson resolved SOLR-14785.
-----------------------------------
    Resolution: Invalid

Please raise questions like this on the user's list, we try to reserve JIRAs for known bugs/enhancements rather than usage questions or a support portal.

See: 
http://lucene.apache.org/solr/community.html#mailing-lists-irc there are links to both Lucene and Solr mailing lists there.

A _lot_ more people will see your question on that list and may be able to help more quickly.

You might want to review: 
https://wiki.apache.org/solr/UsingMailingLists

If it's determined that this really is a code issue or enhancement to Lucene or Solr and not a configuration/usage problem, we can raise a new JIRA or reopen this one.

It's usually not required to have synonyms at both index and query time, so that's a bit odd but I doubt it's your problem.

I'd start by using the admin UI to see if you've updated the schema you think you did as a sanity check. You should be able to view it through the admin UI.

Then I'd add "&debug=query" to the URL and see how the query is actually parsed, perhaps that'll give you a hint.

> Update synonyms by API and reload collection in Solr
> ----------------------------------------------------
>
>                 Key: SOLR-14785
>                 URL: https://issues.apache.org/jira/browse/SOLR-14785
>             Project: Solr
>          Issue Type: Task
>      Security Level: Public(Default Security Level. Issues are Public) 
>          Components: search
>    Affects Versions: 8.6.1
>            Reporter: Gitterh
>            Priority: Major
>
> I am using Solr 8.6.1, started in solrcloud mode.
> The field type is
> ```
> {
>  "add-field-type" : {
>  "name":"articleTitle",
>  "positionIncrementGap":100,
>  "multiValued":false,
>  "class":"solr.TextField",
>  "indexAnalyzer":{
>  "tokenizer":\{ "class":"solr.StandardTokenizerFactory" },
>  "filters":[
>  \{ "class":"solr.LowerCaseFilterFactory" },
>  \{ "class":"solr.ManagedStopFilterFactory", "managed":"english" },
>  \{ "class":"solr.ManagedSynonymGraphFilterFactory", "managed":"english" },
>  \{ "class":"solr.FlattenGraphFilterFactory" },
>  \{ "class":"solr.PorterStemFilterFactory" }
>  ]
>  },
>  "queryAnalyzer":{
>  "tokenizer":\{ "class":"solr.StandardTokenizerFactory" },
>  "filters":[
>  \{ "class":"solr.LowerCaseFilterFactory" },
>  \{ "class":"solr.ManagedStopFilterFactory", "managed":"english" },
>  \{ "class":"solr.ManagedSynonymGraphFilterFactory", "managed":"english" },
>  \{ "class":"solr.PorterStemFilterFactory" }
>  ]
>  }
>  }
>  }
> ```
> After I add a document
> ```
> {
>  "id": 100,
>  "articleTitle": "Best smartphone"
> } 
> ```
> I update the synonyms list by API 
> ```
> curl -X PUT -H 'Content-type:application/json' --data-binary '["iphone", "smartphone"]' "http://localhost:8983/solr/articles/schema/analysis/synonyms/english"
> ```
> and reload the collection by API
> ```
> http://localhost:8983/solr/admin/collections?action=RELOAD&name=articles
> ```
> However when I try to search the documents don't pop-up.
> ```
> http://localhost:8983/solr/articles/select?q=articleTitle:iphone
> ```
> No result are returned. I expected that added document will be returned.
> It works only if I first update the synonyms list and after that add the document into collection.
> How to configure Solr to find the documents by synonyms if the synonyms are changed after documents are created?



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org