lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Cougarman <>
Subject RE: Tokenize on paragraphs and sentences
Date Thu, 18 Apr 2013 13:33:53 GMT
Thanks, Jack. Sorry, took me a while to reply :)
It sounds like sentence/paragraph level searches won't be easy.

Warm regards,

-----Original Message-----
From: Jack Krupansky [] 
Sent: 15 April 2013 5:09 PM
Subject: Re: Tokenize on paragraphs and sentences

Technically, yes, but you would have to do a lot of work yourself. Like, a sentence/paragraph
recognizer that inserted sentence and paragraph markers, and a query parser that allows you
to do SpanNear and SpanNot (to selectively exclude sentence or paragraph marks based on your
granularity of

The LucidWorks Search query parser has SpanNot support (or at least did at one point in time),
but no sentence/paragraph marking.

You could come up with some heuristic regular expressions for sentence and paragraph marks,
like consecutive newlines for a paragraph and dot followed by white space for sentence (with
some more heuristics for abbreviations.)

Or you could have an update processor do the marking.

-- Jack Krupansky

-----Original Message-----
From: Alex Cougarman
Sent: Monday, April 15, 2013 9:48 AM
Subject: Tokenize on paragraphs and sentences

Hi. Is it possible to search within paragraphs or sentences in Solr? The PatternTokenizerFactory
uses regular expressions, but how can this be done with plain ASCII docs that don't have <p>
tags (HTML), yet they're broken into paragraphs? Thanks.

Warm regards,

View raw message