Re: MultiPhraseQuery:Rewrite to BooleanQuery

2015-01-21 Thread dennis yermakov
I'm asking this, because QueryBuilder.createFieldQuery in some cases returns MultiPhraseQuery. I need to know on which terms from MultiPhraseQuery match is present. Explanation doesn't give answer on this question. It only returns string, based on these terms, see MultiPhraseQuery.toStirng() method

Re: MultiPhraseQuery:Rewrite to BooleanQuery

2015-01-21 Thread Ian Lea
Are you asking if your two suggestions 1) a MultiPhraseQuery or 2) a BooleanQuery made up of multiple PhraseQuery instances are equivalent? If so, I'd say that they could be if you build them carefully enough. For the specific examples you show I'd say not and would wonder if you get correct h

Re: MultiPhraseQuery:Rewrite to BooleanQuery

2015-01-21 Thread ku3ia
ku3ia wrote > Hi folks! > I have a multiphrase query, for example, from units: > > Directory indexStore = newDirectory(); > RandomIndexWriter writer = new RandomIndexWriter(random(), indexStore); > add("blueberry chocolate pie", writer); > add("blueberry chocolate tart", writer); > IndexReader r =

MultiPhraseQuery:Rewrite to BooleanQuery

2015-01-12 Thread ku3ia
Hi folks! I have a multiphrase query, for example, from units: Directory indexStore = newDirectory(); RandomIndexWriter writer = new RandomIndexWriter(random(), indexStore); add("blueberry chocolate pie", writer); add("blueberry chocolate tart", writer); IndexReader r = writer.getReader(); writer.

MultiPhraseQuery:Rewrite to BooleanQuery

2015-01-12 Thread dennis yermakov
Hi folks! I have a multiphrase query, for example, from units: Directory indexStore = newDirectory(); RandomIndexWriter writer = new RandomIndexWriter(random(), indexStore); add("blueberry chocolate pie", writer); add("blueberry chocolate tart", writer); IndexReader r = writer.getReader(); writer.