Lahiru
Lahiru

Reputation: 2664

Solr do searching sentence based

When a word is given, I need to find the probability it can appear in a sentence. Here, I want to find, Total number of sentences Sentences which contains the given word

In the second requirement, I have to search words considering sentences Not considering docs or fields.

Is this possible?

Upvotes: 0

Views: 32

Answers (1)

MatsLindh
MatsLindh

Reputation: 52822

Index each sentence as a separate document. That way the frequencies will be related to your sentences instead, and you're already considering each sentence as a separate data point.

If you have a core with the complete content already, keep an ID in the sentence core that links back to the document in the document core.

Upvotes: 1

Related Questions