Yes. It seems to work for Default Highlighting. I'm using Fast Vector
Highlighter.

Let me also explain why I went for Fast Vector Highlighter. I wanted the
highlighted content to be complete and not broken words and for that I
 need to use breakIterator which works only for Fast vector highlighting.

Here is my request log.

<lst name="params">
<str name="hl.bs.type">SENTENCE</str>
<str name="hl.fragsize">200</str>
<str name="hl.requireFieldMatch">true</str>
<str name="sort">score desc</str>
<str name="hl.simple.pre">#</str>
<str name="hl.fl">content_raw</str>
<str name="hl">true</str>
<str name="df">content_raw</str>
<str name="hl.bs.language">en</str>
<str name="hl.snippets">10</str>
<str name="hl.useFastVectorHighlighter">true</str>
<str name="q">content_raw:"born Jobs"~10</str>
<str name="hl.simple.post">#</str>
<str name="hl.bs.country">US</str>
<str name="hl.boundaryScanner">breakIterator</str>
</lst>



Regards,
John Eipe

“The Roots of Violence: Wealth without work, Pleasure without conscience,
Knowledge without character, Commerce without morality, Science without
humanity, Worship without sacrifice, Politics without principles”
- Mahatma Gandhi

On 27 October 2014 18:46, david.w.smi...@gmail.com <david.w.smi...@gmail.com
> wrote:

> John,
> I’m not seeing this problem.  Presumably we’re talking about the default
> highlighter (the most accurate one) but I figure the others would match it
> too.  To test, I added the following to HighlightTest.java in Solr and this
> test passed:
>
>   @Test
>   public void testSpan() {
>     final String field = "t_text";
>     assertU(adoc(field, "Jobs was born in San Francisco, California on
> February \n" +
>         "24 1955.", "id", "1"));
>     assertU(commit());
>     assertQ("span",
>         req("q", "\"born Jobs\"~15",
>           "hl", "true", "df", field),
>         "//lst[@name='highlighting']/lst[@name='1']" );
>   }
>
> ~ David Smiley
> Freelance Apache Lucene/Solr Search Consultant/Developer
> http://www.linkedin.com/in/davidwsmiley
>
> On Mon, Oct 27, 2014 at 8:12 AM, john eipe <john77e...@gmail.com> wrote:
>
> > I have this line highlighted
> >
> >  <em>Jobs</em> was <em>born</em> in San Francisco, California on February
> > 24 1955.
> >
> > for query "Jobs born"~15 but not for "born Jobs"~15. I want the same
> result
> > irrespective of the order of search keywords.
> >
> > Regards,
> > John Eipe
> >
> > “The Roots of Violence: Wealth without work, Pleasure without conscience,
> > Knowledge without character, Commerce without morality, Science without
> > humanity, Worship without sacrifice, Politics without principles”
> > - Mahatma Gandhi
> >
> > On 25 October 2014 18:25, Erick Erickson <erickerick...@gmail.com>
> wrote:
> >
> > > Well, the syntax is wrong. You probably want content_raw:"jobs
> > > born"~15. The way slop works, it is the number of "moves" so this will
> > > match "jobs was a man born somewhere" and "all persons born include
> > > jobs". The difference is that the version that has "born" first and
> > > "jobs" second will take an extra move, so if the search is "jobs born"
> > > and the text was "born jobs", the second one would require more slop.
> > >
> > > Best,
> > > Erick
> > >
> > > On Sat, Oct 25, 2014 at 2:48 AM, john eipe <john77e...@gmail.com>
> wrote:
> > > > Hi
> > > >
> > > > I'm trying to match keywords based on 2 fields and excluding order
> > > > importance but with distance restriction.
> > > >
> > > > title:(Jobs) AND content_raw:(Jobs born)~15
> > > >
> > > > This throws error:
> > > > org.apache.solr.search.SyntaxError: Cannot parse '(Jobs born)~15':
> > > > Encountered " <FUZZY_SLOP> "~15 "
> > > >
> > > > What's the correct way to frame this query?
> > > >
> > > > Regards,
> > > > *John Eipe*
> > > >
> > > > “The Roots of Violence: Wealth without work, Pleasure without
> > conscience,
> > > > Knowledge without character, Commerce without morality, Science
> without
> > > > humanity, Worship without sacrifice, Politics without principles”
> > > > - Mahatma Gandhi
> > >
> >
>

Reply via email to