Hi Mikhail

Your suggested solution does seem to work for me. Thank you so much for the 
help!

Best regards
David

For future reference in case someone else wants do the same, here are some more 
details about the steps needed:
- The more like this handler is not in the default solrconfig.xml anymore (I’m 
using 8.2). I had to add it. <requestHandler name="/mlt" 
class="solr.MoreLikeThisHandler">
  </requestHandler>
- The text needs to be sent to solr as stream.body (/mlt?stream.body=text)
- Streaming needs to be activated inside the solrconfig.xml by adding 
<requestParsers enableStreamBody="true”/>


> On 10 Jun 2020, at 18:03, Mikhail Khludnev <m...@apache.org> wrote:
> 
> Hello, David.
> 
> From the code I noticing that MoreLikeThisHandler consumes request body
> when there's no ?q= and analyzes it for doing what are you asking for. I
> see that ref guide obscured this feature.
> 
> On Wed, Jun 10, 2020 at 4:37 PM David Zimmermann <david.zimmerm...@usi.ch>
> wrote:
> 
>> Dear solr community
>> 
>> I’m supposed to extract keywords from long texts. I do have a solr index
>> with a lot of documents from the same domain as my texts. So, I was
>> wondering if I can use solr to extract those keywords. Ideally I would want
>> to use the TF-IDF basd “importantTerms” from the “more like this” function,
>> but without indexing the text first. Is there a way to run a more like this
>> query not based on a document id, but on a a text supplied by the query? Or
>> is there another way to achieve my goal?
>> 
>> I have also been looking into using the /stream handler, but the solr core
>> is set up as standalone and not in cloud mode.
>> 
>> Best
>> David
> 
> 
> 
> -- 
> Sincerely yours
> Mikhail Khludnev

Reply via email to