Hi,
The word i am giving is "Romer Geoffrey ".The Word is in the Field.
trm.seekCeil(new BytesRef("Geoffrey")) and then when i do String s =
trm.term().utf8ToString(); and hence
It is giving a diffrent word..I think this is why my multiphrasequery is
not giving desired results.
What may be the reason..
On Fri, Sep 27, 2013 at 11:49 AM, VIGNESH S <[email protected]> wrote:
> Hi Lan,
>
> Thanks for your Reply.
>
> I am doing similar to this only..In MultiPhraseQuery object actual phrase
> is going proper but it is not returning any hits..
>
> In Lucene 3.6,I implemented the same logic and it is working.
>
> In Lucene 4.3,I implemented the Index for that using
>
> FieldType offsetsType = new FieldType(TextField.TYPE_STORED);
>
>
> offsetsType.setIndexOptions(IndexOptions.DOCS_AND_FREQS_AND_POSITIONS_AND_OFFSETS);
>
> For MultiphraseQuery, whether I need to add any other parameter in
> addition to this while indexing?
>
> Is there any MultiPhraseQueryTest java file for Lucene 4.3? I checked in
> Lucene branch and i was not able to find..Please kindly help.
>
>
>
>
>
>
> On Thu, Sep 26, 2013 at 2:55 PM, Ian Lea <[email protected]> wrote:
>
>> I use the code below to do something like this. Not exactly what you
>> want but should be easy to adapt.
>>
>>
>> public List<String> findTerms(IndexReader _reader,
>> String _field) throws IOException {
>> List<String> l = new ArrayList<String>();
>> Fields ff = MultiFields.getFields(_reader);
>> Terms trms = ff.terms(_field);
>> TermsEnum te = trms.iterator(null);
>> BytesRef br;
>> while ((br = te.next()) != null) {
>> l.add(br.utf8ToString());
>> }
>> return l;
>> }
>>
>> --
>> Ian.
>>
>> On Wed, Sep 25, 2013 at 3:04 PM, VIGNESH S <[email protected]>
>> wrote:
>> > Hi,
>> >
>> > In the Example of Multiphrase Query it is mentioned
>> >
>> > "To use this class, to search for the phrase "Microsoft app*" first use
>> > add(Term) on the term "Microsoft", then find all terms that have "app"
>> as
>> > prefix using IndexReader.terms(Term), and use
>> MultiPhraseQuery.add(Term[]
>> > terms) to add them to the query"
>> >
>> >
>> > How can i replicate the Same in Lucene 4.3 since
>> IndexReader.terms(Term) is
>> > no more used
>> >
>> > --
>> > Thanks and Regards
>> > Vignesh Srinivasan
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [email protected]
>> For additional commands, e-mail: [email protected]
>>
>>
>
>
> --
> Thanks and Regards
> Vignesh Srinivasan
> 9739135640
>
--
Thanks and Regards
Vignesh Srinivasan
9739135640