Re: BlockJoinQuery with sorting

2016-11-28 Thread ASKozitsin
https://lucene.apache.org/core/6_2_0/join/org/apache/lucene/search/join/ToParentBlockJoinSortField.html Fits Perfectly! Thanks for the link! -- View this message in context: http://lucene.472066.n3.nabble.com/BlockJoinQuery-with-sorting-tp4307405p4307672.html Sent from the Lucene - Java Users

Re: BlockJoinQuery with sorting

2016-11-28 Thread Mikhail Khludnev
As it's described in Solr space http://blog-archive.griddynamics.com/2015/08/scoring-join-party-in-solr-53.html you can add a function query for price value field in a child query as SHOULD, then pass ScoreMode into BlockJoinQuery and it will yield scores. There are two things to mention: I'm not s

Re: BlockJoinQuery with sorting

2016-11-28 Thread ASKozitsin
Here is an example: I've got 3 Offerings with such prices: [Offering1 : { id : 1, price : { value: [10, 30, 20], type : t1 } }, Offering2 : { id : 2, price : { value: [20], type : t2 } }, Offering3 : { id : 3, price : { value: [15, 40], type : t3} }] Originally, I would like to filter data by a

Re: BlockJoinQuery with sorting

2016-11-26 Thread Mikhail Khludnev
private reply: it's not clear what you retrieve and what you want to sort, parents by matching children or lists of children associated to parents. PLs respond to the list. On Fri, Nov 25, 2016 at 3:24 PM, ASKozitsin wrote: > Hi, everyone! > > I'm using 6.3.0 Lucene. > > I've got two structures:

Re: BlockJoinQuery is missing in lucene-4.1.0 .

2014-01-30 Thread Michael McCandless
You are passing ScoreMode.NONE right now, when you create the ToParentBlockJoinQuery; have a look at the javadocs for the other options? You could normalize all scores by the maxScore, if you must produce a percentage? Mike McCandless http://blog.mikemccandless.com On Thu, Jan 30, 2014 at 7:31

Re: BlockJoinQuery is missing in lucene-4.1.0 .

2014-01-30 Thread Priyanka Tufchi
Hello Mike Thanks for the reply ,Now we are able to get TopGroups. but still we are not able to get score .how ever we got matched Parent and child through following code. We need score for showing in our application for ranking . Document childDoc = indexsearcher.doc(group.scoreDocs[0].doc)

Re: BlockJoinQuery is missing in lucene-4.1.0 .

2014-01-30 Thread Michael McCandless
You should not use TextField.TYPE_STORED to index your docType field: that field type runs the analyzer. I'm not sure that matters in your case, but that's deadly in general. Use StringField instead (it indexes the provided text as a single token). Likewise for color, size fields. Try running y

Re: BlockJoinQuery is missing in lucene-4.1.0 .

2014-01-30 Thread Priyanka Tufchi
Hello Michael, following is the code. This is the Sample which we are trying to get the the hits.Please Guide us public void newTry() throws IOException { StandardAnalyzer analyzer = new StandardAnalyzer (Version.LUCENE_41); /

Re: BlockJoinQuery is missing in lucene-4.1.0 .

2014-01-30 Thread Michael McCandless
Hi, It looks like the mailing list stripped the attachment; can you try inlining the code into your email (is it brief?). Also, have a look at the unit-test for ToParentBJQ and compare how it runs the query with your code? Mike McCandless http://blog.mikemccandless.com On Thu, Jan 30, 2014 at

Re: BlockJoinQuery is missing in lucene-4.1.0 .

2014-01-30 Thread Priyanka Tufchi
Hello Michael, We tried the sample of code but the value of "hits" we are getting is null. We tried to search on net but no proper sample example given which can help us to understand. We attached our code with mail .please it would be great if you can give a look to our code. Thanks. On Wed

Re: BlockJoinQuery is missing in lucene-4.1.0 .

2014-01-29 Thread Priyanka Tufchi
Hello Michael, In the example given in your blog in following line there is error searcher.search(query, c); whether it should convert in IndexSearcher there is no explanation given for document addition in blog example ? Can you please provide helping hand. Thanks. On Wed, Jan 29, 2014

Re: BlockJoinQuery is missing in lucene-4.1.0 .

2014-01-29 Thread Michael McCandless
Actually, the blog post should still apply: just insert ToParent to rename things. ToChildBlockJoinQuery is the same idea, but it joins in the reverse direction, so e.g. if your index has CDs (parent docs) and individual songs on those CDs (child docs), you can take a parent-level constraint (e.g.

Re: BlockJoinQuery is missing in lucene-4.1.0 .

2014-01-29 Thread Priyanka Tufchi
Hello Michael, Can i get code snippet for this new classes: ToParentBlockJoinQuery, ToChildBlockJoinQuery and how to use it. thanks On Wed, Jan 29, 2014 at 2:22 AM, Michael McCandless wrote: > Sorry, BlockJoinQuery was split into two separate classes: > ToParentBlockJoinQuery, ToChildBlockJoinQ

Re: BlockJoinQuery is missing in lucene-4.1.0 .

2014-01-29 Thread Michael McCandless
Sorry, BlockJoinQuery was split into two separate classes: ToParentBlockJoinQuery, ToChildBlockJoinQuery. Mike McCandless http://blog.mikemccandless.com On Wed, Jan 29, 2014 at 4:32 AM, Priyanka Tufchi wrote: > Subject: BlockJoinQuery is missing in lucene-4.1.0 . > To: java-user@lucene.apache.

Re: BlockJoinQuery

2013-08-15 Thread vonPuh fonPuhendorf
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 1s 2. i have to make infixs

Re: BlockJoinQuery

2013-08-15 Thread Michael McCandless
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

Re: BlockJoinQuery

2013-08-14 Thread vonPuh fonPuhendorf
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.

Re: BlockJoinQuery

2013-08-14 Thread vonPuh fonPuhendorf
but if i want to make this a suggester will be a hard case isnt it?

Re: BlockJoinQuery

2013-08-14 Thread Michael McCandless
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, 20

Re: BlockJoinQuery

2013-08-14 Thread vonPuh fonPuhendorf
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 > Yes. > > Mike McCandless > > http://blog.mikemccandless.com > > > On Wed, Aug 14, 2013 at 11:50 AM, vonPuh fonPuhendorf > wrote: > > hi,

Re: BlockJoinQuery

2013-08-14 Thread Michael McCandless
Yes. Mike McCandless http://blog.mikemccandless.com On Wed, Aug 14, 2013 at 11:50 AM, vonPuh fonPuhendorf 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 res

Re: BlockJoinQuery: delete documents

2013-03-05 Thread Wei Wang
To allow deleting the document block all at once, here is another possibility: In addDocuments() function, add an internal field, i.e., "_num_children_docs_", for the number of children documents. Since the doc ID of all parent/children documents are consecutive, we can use this internal field tog

Re: BlockJoinQuery: delete documents

2013-03-03 Thread Wei Wang
I see. Probably assigning blockID is the most efficient way. Thanks. On Sun, Mar 3, 2013 at 7:39 AM, Michael McCandless wrote: > IndexWriter doesn't track the blocks ... so you need to something yourself. > > One approach is to add a Field, eg blockID, with the same value (maybe > the id of the p

Re: BlockJoinQuery: delete documents

2013-03-03 Thread Michael McCandless
IndexWriter doesn't track the blocks ... so you need to something yourself. One approach is to add a Field, eg blockID, with the same value (maybe the id of the parent doc) to parent and child docs, and then delete by that. You may also get away with just deleting the parent or just the children,

Re: BlockJoinQuery Clarification

2012-08-02 Thread Michael McCandless
Open an IndexWriter with OpenMode.CREATE, or call IndexWriter.deleteAll on an already open IndexWriter. Mike McCandless http://blog.mikemccandless.com On Thu, Aug 2, 2012 at 4:28 PM, developer3459 wrote: > Is there an quick/easy way to delete the entire collection at once? Im > looking to delet

Re: BlockJoinQuery Clarification

2012-08-02 Thread developer3459
Is there an quick/easy way to delete the entire collection at once? Im looking to delete and replace the entire collection in one fell swoop. -- View this message in context: http://lucene.472066.n3.nabble.com/BlockJoinQuery-Clarification-tp3848728p3998902.html Sent from the Lucene - Java User

Re: BlockJoinQuery Clarification

2012-08-02 Thread Michael McCandless
You must delete all children when you delete the parent. I believe you can delete individual children and leave the parent undeleted. Mike McCandless http://blog.mikemccandless.com On Thu, Aug 2, 2012 at 4:03 PM, developer3459 wrote: > > Is there a way to delete a parent doc from the collectio

Re: BlockJoinQuery Clarification

2012-08-02 Thread developer3459
Is there a way to delete a parent doc from the collection, or delete a child doc from the collection? If so, will deleting the parent doc of a collection orphan the associated child docs or will they automatically be deleted as well? thanks -D -- View this message in context: http://lucene.4

Re: BlockJoinQuery Clarification

2012-03-22 Thread Michael McCandless
You have to replace all documents in the block (1 parent, 4 children in your example) to update any of the documents... only updating the child (or child + parent) will break the join... There's also query-time joining coming in 3.6.0. Mike McCandless http://blog.mikemccandless.com On Thu, Mar

Re: BlockJoinQuery in text queries

2012-01-26 Thread Michael McCandless
I don't think there is one yet... it's [still] one of the limitations I listed here: http://blog.mikemccandless.com/2012/01/searching-relational-content-with.html But... if there were one, I don't think it would be user controllable. I think it's more of an up-front schema thing, eg you'd tell