You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@solr.apache.org by Mikhail Khludnev <mk...@apache.org> on 2022/12/03 09:12:30 UTC

Re: Seeking tips about MoreLikeThis exceptions

Hi,
It's a bug in MLTComponent, it can't handle field values with colon, etc.
As a workaround we can use [subquery] result transformer with mlt query
parser.
For example, in Solr admin  UI
I added fl param as fl=workaround:[subquery], then in raw parameters:
workaround.q={!mlt qf=manu v=$row.id mintf=0 mindf=0}
This query adds subquery result into every doc like:
"workaround":{"numFound":2,"start":0,"numFoundExact":true,"docs":[ { "id":
"VS1GB400C3",

On Tue, Nov 22, 2022 at 9:09 PM Wu, Hansen [USA] <wu...@bah.com.invalid>
wrote:

> Hello Solr folks,
> I have a Web Service app, which uses CloudSolrClient to connect to a solr
> server to query for similar documents against field search in a collection
> through MoreLikeThis function by given docId. The content in the search
> field is copied from original text of a document.
> The Web Service app works fine with most documents. But whenever a
> document contains colon, e.g. "subj:cedation", it throws out exceptions,
> complaining about ":". Have you folks ever seen such problems? Any tips to
> resolve  the issue?
>
> In my dev env, I have a newer version of solr installed, which uses
> HttpSolrClient to do the same query. The problem didn't happen. I was
> wondering whether the issues only happen with old versions of solr or not.
>
> I wish to get ideas from solr community.
> Thanks a lot in advance.
>
> Hansen Wu
> Associate | Lead Data Scientist
> Booz | Allen | Hamilton
>
> Email: wu_hanxin@bah.com<ma...@bah.com>
>
>
>

-- 
Sincerely yours
Mikhail Khludnev