You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by vonPuh fonPuhendorf <vo...@gmail.com> on 2013/08/14 17:50:08 UTC

BlockJoinQuery

hi, can i use BlockJoinQuery to search only relative content i.e a parrent
will be post id and the children will be all the comments in the
threads(userids)

and return results only for comments from exact postid? i.e user 222 seach
for "blah" from postid "1234" and results from only that postid will be
present? Something like every post is "mini index"

Re: BlockJoinQuery

Posted by vonPuh fonPuhendorf <vo...@gmail.com>.
yes. I need infixsuggester to show suggests on comments only for one
specific postid but otherwise contain the whole  posts, but after thinking
about it ,might just use filter on postid?
1. will this be expensive operation, a bit of overkill just for 1 postid.
among 10000s

2. i have to make infixsuggester to index

(String term, long v, BytesRef payload, BytesRef2 payload) with being

new TermFreqPayload(doc.get("contents"), 3, new
BytesRef(doc.get("postId")), new BytesRef2(doc.get("commentId")) and then
just filter on postid.

Wanted to use blockjoinquery because there will be more fields not just
contenent. does this become complicated, something that infixsuggester
doesnt build to do?



2013/8/15 Michael McCandless <lu...@mikemccandless.com>

> Sorry, I'm not following what you're trying to do.
>
> It sounds like you want to tweak AnalyzingInfixSuggester to somehow
> use BlockJoinQuery based on the comments in your user's posts?
>
> Can you give more of a big picture here?
>
> Mike McCandless
>
> http://blog.mikemccandless.com
>
>
> On Thu, Aug 15, 2013 at 1:55 AM, vonPuh fonPuhendorf
> <vo...@gmail.com> wrote:
> > want to use the infix suggester but instead to create different index for
> > every  postid (which was initial consideration - not very wise one :)) I
> > want to create one index containing all the information about the postsid
> > and every comment and for every to suggest matches only for a specific
> > postid. any direction?
> >
> >
> > 2013/8/15 vonPuh fonPuhendorf <vo...@gmail.com>
> >
> >> but if i want to make this a suggester will be a hard case isnt it?
> >>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>

Re: BlockJoinQuery

Posted by Michael McCandless <lu...@mikemccandless.com>.
Sorry, I'm not following what you're trying to do.

It sounds like you want to tweak AnalyzingInfixSuggester to somehow
use BlockJoinQuery based on the comments in your user's posts?

Can you give more of a big picture here?

Mike McCandless

http://blog.mikemccandless.com


On Thu, Aug 15, 2013 at 1:55 AM, vonPuh fonPuhendorf
<vo...@gmail.com> wrote:
> want to use the infix suggester but instead to create different index for
> every  postid (which was initial consideration - not very wise one :)) I
> want to create one index containing all the information about the postsid
> and every comment and for every to suggest matches only for a specific
> postid. any direction?
>
>
> 2013/8/15 vonPuh fonPuhendorf <vo...@gmail.com>
>
>> but if i want to make this a suggester will be a hard case isnt it?
>>

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Re: BlockJoinQuery

Posted by vonPuh fonPuhendorf <vo...@gmail.com>.
want to use the infix suggester but instead to create different index for
every  postid (which was initial consideration - not very wise one :)) I
want to create one index containing all the information about the postsid
and every comment and for every to suggest matches only for a specific
postid. any direction?


2013/8/15 vonPuh fonPuhendorf <vo...@gmail.com>

> but if i want to make this a suggester will be a hard case isnt it?
>

Re: BlockJoinQuery

Posted by vonPuh fonPuhendorf <vo...@gmail.com>.
but if i want to make this a suggester will be a hard case isnt it?

Re: BlockJoinQuery

Posted by Michael McCandless <lu...@mikemccandless.com>.
You have to re-index the parent + all children (and delete the
previous parent + all its children) whenever you want to add a new
child doc.

If you want to delete just children then you can do that w/o
reindexing the full block.

Mike McCandless

http://blog.mikemccandless.com


On Wed, Aug 14, 2013 at 4:19 PM, vonPuh fonPuhendorf
<vo...@gmail.com> wrote:
> and can documents cam be added dynamic i.e new comments can be indexed and
> added to parent   doc? or have to rebuild the index
>
>
> 2013/8/14 Michael McCandless <lu...@mikemccandless.com>
>
>> Yes.
>>
>> Mike McCandless
>>
>> http://blog.mikemccandless.com
>>
>>
>> On Wed, Aug 14, 2013 at 11:50 AM, vonPuh fonPuhendorf
>> <vo...@gmail.com> wrote:
>> > hi, can i use BlockJoinQuery to search only relative content i.e a
>> parrent
>> > will be post id and the children will be all the comments in the
>> > threads(userids)
>> >
>> > and return results only for comments from exact postid? i.e user 222
>> seach
>> > for "blah" from postid "1234" and results from only that postid will be
>> > present? Something like every post is "mini index"
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>> For additional commands, e-mail: java-user-help@lucene.apache.org
>>
>>

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Re: BlockJoinQuery

Posted by vonPuh fonPuhendorf <vo...@gmail.com>.
and can documents cam be added dynamic i.e new comments can be indexed and
added to parent   doc? or have to rebuild the index


2013/8/14 Michael McCandless <lu...@mikemccandless.com>

> Yes.
>
> Mike McCandless
>
> http://blog.mikemccandless.com
>
>
> On Wed, Aug 14, 2013 at 11:50 AM, vonPuh fonPuhendorf
> <vo...@gmail.com> wrote:
> > hi, can i use BlockJoinQuery to search only relative content i.e a
> parrent
> > will be post id and the children will be all the comments in the
> > threads(userids)
> >
> > and return results only for comments from exact postid? i.e user 222
> seach
> > for "blah" from postid "1234" and results from only that postid will be
> > present? Something like every post is "mini index"
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>

Re: BlockJoinQuery

Posted by Michael McCandless <lu...@mikemccandless.com>.
Yes.

Mike McCandless

http://blog.mikemccandless.com


On Wed, Aug 14, 2013 at 11:50 AM, vonPuh fonPuhendorf
<vo...@gmail.com> wrote:
> hi, can i use BlockJoinQuery to search only relative content i.e a parrent
> will be post id and the children will be all the comments in the
> threads(userids)
>
> and return results only for comments from exact postid? i.e user 222 seach
> for "blah" from postid "1234" and results from only that postid will be
> present? Something like every post is "mini index"

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org