Re: How to use Query Time Join with Lucene 5.3.0?

2016-06-14 Thread Martijn v Groningen
The blog you're referring to is explaining the query time join implementation that isn't using ordinal map, which is the first method in the JoinUtil class (with the ordinal map as parameter). If you want to use the method that uses global ordinals you can use this snippet to create an OrdinalMap

Re: Lucene 5.2.0 global ordinal based query time join on multiple indexes

2015-07-30 Thread Martijn v Groningen
Hi Alex, I never took joining based on multiple indices into account when creating the global ordinal join. I like your idea of using a multi reader to make the join think it is running on one index. But I don't know if there are edge cases where this might not work. Martijn On 21 July 2015 at 2

Re: Join Util with Filter Queries

2013-08-08 Thread Martijn v Groningen
ke that my problem isn't so much with the > join utility, but more with my query parser plugging class. Is there > something that it missing in the above link example that I need to also add > to mine to ensure that queries are applied pre join? Thanks. > > -Shane > > &

Re: Join Util with Filter Queries

2013-08-02 Thread Martijn v Groningen
Hi, If you specify the FilteredQuery via the 'fromQuery' parameter, then they should be executed before the the join operation is performed. What makes you think that the FilteredQuery is applied post join? Martijn On 1 August 2013 22:33, Shane Strasser wrote: > Hey All, > > We're currently l

Re: BlockJoin and RawTermFilter (lucene 4.0.0)

2013-01-17 Thread Martijn v Groningen
I don't recall that the RawTermFilter was required. The following code should also work in 4.x: Filter parentsFilter = new CachingWrapperFilter(new QueryWrapperFilter(new TermQuery(new Term("type", "T1"; Martijn On 16 January 2013 16:51, kiwi clive wrote: > Hi Guys, > > Apologies if this has

Re: Re: Group by on multi fields

2012-12-14 Thread Martijn v Groningen
more expensive (execution wise). I hope this gives you some pointers to start with. Martijn On 11 December 2012 02:55, dizh wrote: > Thanks to Martijn v Groningen. > > but , Is there anyone who has implemented this feature? just like SQL : > select a1,a2,sum(a3) group by a1,a2; > &g

Re: Group by on multi fields

2012-12-10 Thread Martijn v Groningen
Hi Dish, Grouping on multiple fields or a field that has multiple tokens (or values) per document hasn't been implemented yet. Martijn On 10 December 2012 07:12, dizh wrote: > Hi All: > I want to ask how to do "Group by on multi fields ". > The Lucene JavaDOC only gives a demo about how to grou

Re: Lucene 4.0 delete by ID

2012-10-28 Thread Martijn v Groningen
A top level document ID can change over time. For that reason you shouldn't rely on it. However if you know your index is stable or you keep track when a merge happes, you can use the IndexWriter#tryDeleteDocument method to delete a document by Lucene id. Deleting a document via a IndexReader is no

Re: Lucene join

2012-08-28 Thread Martijn v Groningen
Lucene isn't a relation database. However there are some methods to have a relational like search: 1) Index time joins: http://blog.mikemccandless.com/2012/01/searching-relational-content-with.html 2) Query time joins: http://www.searchworkings.org/blog/-/blogs/query-time-joining-in-lucene Martijn

Re: ToParentBlockJoinQuery - Faceting on Parent and Child Documents

2012-08-03 Thread Martijn v Groningen
Hi Jayendra, This isn't supported yet. You could implement this by creating a custom Lucene collector. This collector could count the unique hits inside a block of docs per unique facet field value. The unique facet values could be retrieved from Lucene's FieldCache or doc values (if you can use L

Re: Lucene Grouping problem

2012-05-25 Thread Martijn v Groningen
If the time span or website (I assume you mean domain name) is a field in your index then you can use result grouping. Result grouping has impact on your query time and if you have a lot of data you need to divide your data across multiple indices and use distributed result grouping. Martijn On 2

Re: ToParentBlockJoinQuery$BlockJoinWeight cannot explain match on parent document

2012-05-25 Thread Martijn v Groningen
Hi Christoph, You can open an issue for this. I think we can use the child score as an explanation of why a parent doc is scored the way it is. Martijn On 25 May 2012 13:20, Christoph Kaser wrote: > Hello all, > > I try to calculate score explanations for a query that contains a > ToParentBlock

Re: createJoinQuery use

2012-03-29 Thread Martijn v Groningen
It is only possible to join on one side at the same time. You mean something like this: Query fromQuery = JoinUtil.createJoinQuery("from", "to", actualQuery, indexSearcher); Query toQuery = JoinUtil.createJoinQuery("to", "from", actualQuery, indexSearcher); And then use a boolean query to combine

Re: JoinUtil.createJoinQuery in 3.6 ?

2012-03-29 Thread Martijn v Groningen
Some extra notes: 1) he implementation in 3.6 is about 3 times slower. I noticed this during some tests that I ran on my test data set. The 3.6 implementation is definitely usable. Also on larger indices. I believe the average query time was around 350 ms on an index containing 10M documents. 2) Th

Re: ToParentBlockJoinQuery query loop finitely

2012-03-23 Thread Martijn v Groningen
Hi, There is an example usage in the package.html. Something to keep in mind is that this search time join is different than block join query. The JoinUtil can be used to do join filtering and the block join is more meant for parent / child search. Martijn On 23 March 2012 11:58, Li Li wrote:

Re: Books about lucene

2009-11-27 Thread Martijn v Groningen
http://nlp.stanford.edu/IR-book/information-retrieval-book.html gives a good introduction what happens under the hood of a search engine and you can download it for free. It does not explain Lucene directly, but a lot of IR algorithms that are used in Lucene (and any other search engine) are explai