Re: Getting list of committed documents

2016-11-10 Thread lukes
Hi,

 Can anyone please suggest or point in some directions.

Regards.



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Getting-list-of-committed-documents-tp4305258p4305503.html
Sent from the Lucene - Java Users mailing list archive at Nabble.com.

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



Re: Luke alternative

2016-11-10 Thread Chris Bamford
Hi Erick,

Good to know, I'll try and help if I can.

No Solr here, though, just pure Lucene.

Best,

Chris

Sent from my iPhone

> On 10 Nov 2016, at 15:56, Erick Erickson  wrote:
> 
> Please do work with Alan, he does good stuff ;)...
> 
> In the meantime, you might be thinking of the LukeReqeustHandler
> assuming you're using Solr.
> 
> Best,
> Erick
> 
>> On Thu, Nov 10, 2016 at 5:32 AM, Alan Woodward  wrote:
>> Hi Chris,
>> 
>> I’ve been working sporadically on a webservice API called marple: 
>> https://github.com/flaxsearch/marple . 
>>  Very much a project in development, but more testers and contributors are 
>> always welcome!
>> 
>> Alan Woodward
>> www.flax.co.uk
>> 
>> 
>>> On 10 Nov 2016, at 13:23, Chris Bamford  wrote:
>>> 
>>> Hi
>>> 
>>> I recently heard about an alternative (API?) to Luke for examining indexes.
>>> 
>>> Can someone please point me to it?
>>> 
>>> Thanks
>>> 
>>> Chris
>>> 
>>> -
>>> To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
>>> For additional commands, e-mail: java-user-h...@lucene.apache.org
>>> 
>> 
> 
> -
> To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
> For additional commands, e-mail: java-user-h...@lucene.apache.org
> 


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



Re: Luke alternative

2016-11-10 Thread Erick Erickson
Please do work with Alan, he does good stuff ;)...

In the meantime, you might be thinking of the LukeReqeustHandler
assuming you're using Solr.

Best,
Erick

On Thu, Nov 10, 2016 at 5:32 AM, Alan Woodward  wrote:
> Hi Chris,
>
> I’ve been working sporadically on a webservice API called marple: 
> https://github.com/flaxsearch/marple .  
> Very much a project in development, but more testers and contributors are 
> always welcome!
>
> Alan Woodward
> www.flax.co.uk
>
>
>> On 10 Nov 2016, at 13:23, Chris Bamford  wrote:
>>
>> Hi
>>
>> I recently heard about an alternative (API?) to Luke for examining indexes.
>>
>> Can someone please point me to it?
>>
>> Thanks
>>
>> Chris
>>
>> -
>> To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
>> For additional commands, e-mail: java-user-h...@lucene.apache.org
>>
>

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



Re: Lucene 6.3 faceting documentation

2016-11-10 Thread Glen Newton
Great! Thanks so much!  :-)

Glen

On Thu, Nov 10, 2016 at 9:47 AM, Shai Erera  wrote:

> We've removed the userguide a long time ago. We have a set of example files
> under lucene-demo, e.g. here
> https://lucene.apache.org/core/6_3_0/demo/src-html/org/
> apache/lucene/demo/facet/
> .
>
> Also, you can read some blog posts, start here:
> http://shaierera.blogspot.com/2012/11/lucene-facets-part-1.html and then
> http://shaierera.blogspot.com/2012/11/lucene-facets-part-2.html, though
> the
> code examples may be outdated. The lucene-demo source is up-to-date though.
>
> Shai
>
> On Thu, Nov 10, 2016 at 4:40 PM Glen Newton  wrote:
>
> > I am looking for documentation on Lucene faceting. The most recent
> > documentation I can find is for 4.0.0 here:
> >
> > http://lucene.apache.org/core/4_0_0/facet/org/apache/lucene/
> facet/doc-files/userguide.html
> >
> > Is there more recent documentation for 6.3.0? Or 6.x?
> >
> > Thanks,
> > Glen
> >
>


Re: Lucene 6.3 faceting documentation

2016-11-10 Thread Shai Erera
We've removed the userguide a long time ago. We have a set of example files
under lucene-demo, e.g. here
https://lucene.apache.org/core/6_3_0/demo/src-html/org/apache/lucene/demo/facet/
.

Also, you can read some blog posts, start here:
http://shaierera.blogspot.com/2012/11/lucene-facets-part-1.html and then
http://shaierera.blogspot.com/2012/11/lucene-facets-part-2.html, though the
code examples may be outdated. The lucene-demo source is up-to-date though.

Shai

On Thu, Nov 10, 2016 at 4:40 PM Glen Newton  wrote:

> I am looking for documentation on Lucene faceting. The most recent
> documentation I can find is for 4.0.0 here:
>
> http://lucene.apache.org/core/4_0_0/facet/org/apache/lucene/facet/doc-files/userguide.html
>
> Is there more recent documentation for 6.3.0? Or 6.x?
>
> Thanks,
> Glen
>


Lucene 6.3 faceting documentation

2016-11-10 Thread Glen Newton
I am looking for documentation on Lucene faceting. The most recent
documentation I can find is for 4.0.0 here:
http://lucene.apache.org/core/4_0_0/facet/org/apache/lucene/facet/doc-files/userguide.html

Is there more recent documentation for 6.3.0? Or 6.x?

Thanks,
Glen


Re: Query parser and default operator

2016-11-10 Thread Pawel Rog
Thank you Dawid :)

--
Paweł Róg

On Thu, Nov 10, 2016 at 1:30 PM, Dawid Weiss  wrote:

> This does look odd. I filed this issue to track it:
>
> https://issues.apache.org/jira/browse/LUCENE-7550
>
> But I can't promise you I'll have the time to look into this any time
> soon. Feel free to step down through the source and see why the
> difference is there (patches welcome!).
>
>
> On Wed, Nov 9, 2016 at 11:26 PM, Pawel Rog  wrote:
> > Hi Dawid,
> > Thanks for your email. It seems StandardQueryParser is free from
> > this unexpected behavior.
> >
> > I used the code below with Lucene 6.2.1
> > (org.apache.lucene.queryparser.classic.QueryParser)
> >
> > QueryParser parser = new QueryParser("test", new
> WhitespaceAnalyzer());
> >
> > parser.setDefaultOperator(QueryParser.Operator.AND);
> > Query query = parser.parse("foo AND bar OR baz ");
> > System.out.println(query.toString());
> >
> > parser.setDefaultOperator(QueryParser.Operator.OR);
> > query = parser.parse("foo AND bar OR baz ");
> > System.out.println(query.toString());
> >
> >
> > I can also reproduce it on Elasticsearch 2.2 which uses Lucene 5.4.0
> >
> > $  curl -s 'localhost:9200/test/_search?pretty' -d '{ "query": {
> > "query_string": { "query": "foo AND bar OR baz" , "default_operator":
> "and"
> > } } , "profile" : true}' | grep luce
> >   "lucene" : "+_all:foo _all:bar _all:baz",
> > ...
> >
> > $ curl -s 'localhost:9200/test/_search?pretty' -d '{ "query": {
> > "query_string": { "query": "foo AND bar OR baz" , "default_operator":
> "or"
> > } } , "profile" : true}' | grep luce
> >   "lucene" : "+_all:foo +_all:bar _all:baz",
> > ...
> >
> > Elasticsearch uses class called MapperQueryParser which extends
> > org.apache.lucene.queryparser.classic.QueryParser
> >
> > --
> > Paweł Róg
> >
> > On Wed, Nov 9, 2016 at 6:10 PM, Dawid Weiss 
> wrote:
> >
> >> Which Lucene version and which query parser is this? Can you provide a
> >> test case/ code sample?
> >> I just tried with StandardQueryParser and for:
> >>
> >> sqp.setDefaultOperator(StandardQueryConfigHandler.
> Operator.AND);
> >> dump(sqp.parse("foo AND bar OR baz", "field_a"));
> >> sqp.setDefaultOperator(StandardQueryConfigHandler.Operator.OR);
> >> dump(sqp.parse("foo AND bar OR baz", "field_a"));
> >>
> >> I get the same result:
> >>
> >> BooleanQuery: +field_a:foo +field_a:bar field_a:baz
> >>
> >> Dawid
> >>
> >> On Wed, Nov 9, 2016 at 6:04 PM, Pawel Rog 
> wrote:
> >> > Hi Eric,
> >> > Thank you for your email.
> >> > I understand that Lucene queries are not in boolean logic. My point is
> >> only
> >> > that I would expect identical Lucene queries build from the same input
> >> > string. My intuition says that default operator should not matter in 2
> >> > examples I presented in previous email.
> >> >
> >> > --
> >> > Paweł Róg
> >> >
> >> > On Wed, Nov 9, 2016 at 4:32 PM, Erick Erickson <
> erickerick...@gmail.com>
> >> > wrote:
> >> >
> >> >> Lucene queries aren't boolean logic. You can simulate boolean logic
> by
> >> >> explicitly parenthesizing, here's an excellent blog on this:
> >> >>
> >> >> https://lucidworks.com/blog/why-not-and-or-and-not/
> >> >>
> >> >> Best,
> >> >> Erick
> >> >>
> >> >> On Wed, Nov 9, 2016 at 1:37 AM, Pawel Rog 
> >> wrote:
> >> >> > Hello ,
> >> >> > I have a query `foo AND bar OR baz`. When I use "AND" as a default
> >> >> operator
> >> >> > this is the resulting Lucene  query:
> >> >> >
> >> >> > `+test:foo test:bar test:baz`
> >> >> >
> >> >> > When I use "OR" this is the resulting query
> >> >> >
> >> >> > `+test:foo +test:bar test:baz`
> >> >> >
> >> >> >
> >> >> > I expected these two return exactly the same Lucene query because I
> >> used
> >> >> > operator explicitly. I thought that the default operator is used
> only
> >> >> when
> >> >> > operator is not explicitly mentioned in the query. Am I missing
> >> something
> >> >> > or this is not expected behavior (bug)?
> >> >> >
> >> >> > --
> >> >> > Paweł Róg
> >> >>
> >> >> 
> -
> >> >> To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
> >> >> For additional commands, e-mail: java-user-h...@lucene.apache.org
> >> >>
> >> >>
> >>
> >> -
> >> To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
> >> For additional commands, e-mail: java-user-h...@lucene.apache.org
> >>
> >>
>
> -
> To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
> For additional commands, e-mail: java-user-h...@lucene.apache.org
>
>


Re: Migrate BooleanQuery Lucene 4.9.0 to Lucene 6.0.3

2016-11-10 Thread Humberto Rocha
Oliver,

worked perfectly!

Thanks a lot !

Best regards,

Humberto



On Thu, Nov 10, 2016 at 8:37 AM, Oliver Kaleske  wrote:

> Hi,
>
> try
> BooleanQuery inner = new BooleanQuery.Builder().add(ownerQueryX,
> Occur.SHOULD).add(groupQueryY, Occur.SHOULD).build();
> BooleanQuery constrainedQuery = new BooleanQuery.Builder().add(inner,
> Occur.MUST).add(query, Occur.MUST).build();
>
> You can also split this into several statements if you prefer (probably a
> good idea if you have more than just those two sub-queries per
> BooleanQuery).
>
> Best regards,
> Oliver
>
>
>
> -Original Message-
> From: Humberto Rocha [mailto:humro...@gmail.com]
> Sent: Thursday, November 10, 2016 2:32 AM
> To: java-user@lucene.apache.org
> Subject: Migrate BooleanQuery Lucene 4.9.0 to Lucene 6.0.3
>
> Hi,
>
> In Lucene 4.9.0 i have:
>
>
> QueryParser parser = new QueryParser("contents",
> analisador);
> Query query = parser.parse(parametro);
>
> BooleanQuery constrainedQuery = new BooleanQuery();
> BooleanQuery inner = new BooleanQuery();
> inner.add(ownerQueryX, Occur.SHOULD);
> inner.add(groupQueryY, Occur.SHOULD);
> constrainedQuery.add(inner, Occur.MUST);
> constrainedQuery.add(query, Occur.MUST);
>
>
> How migrate this to Lucene 6.0.3?
>
> I saw BooleanQuery.Builder
>  lucene/search/BooleanQuery.Builder.html>
> but
> i have problems to use.
>
> Could someone help me please?
>
> --
> Humberto Rocha
>



-- 
Humberto Rocha


Re: Luke alternative

2016-11-10 Thread Alan Woodward
Hi Chris,

I’ve been working sporadically on a webservice API called marple: 
https://github.com/flaxsearch/marple .  
Very much a project in development, but more testers and contributors are 
always welcome!

Alan Woodward
www.flax.co.uk


> On 10 Nov 2016, at 13:23, Chris Bamford  wrote:
> 
> Hi
> 
> I recently heard about an alternative (API?) to Luke for examining indexes.
> 
> Can someone please point me to it?
> 
> Thanks
> 
> Chris
> 
> -
> To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
> For additional commands, e-mail: java-user-h...@lucene.apache.org
> 



Luke alternative

2016-11-10 Thread Chris Bamford
Hi

I recently heard about an alternative (API?) to Luke for examining indexes.

Can someone please point me to it?

Thanks

Chris

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



Re: Query parser and default operator

2016-11-10 Thread Dawid Weiss
This does look odd. I filed this issue to track it:

https://issues.apache.org/jira/browse/LUCENE-7550

But I can't promise you I'll have the time to look into this any time
soon. Feel free to step down through the source and see why the
difference is there (patches welcome!).


On Wed, Nov 9, 2016 at 11:26 PM, Pawel Rog  wrote:
> Hi Dawid,
> Thanks for your email. It seems StandardQueryParser is free from
> this unexpected behavior.
>
> I used the code below with Lucene 6.2.1
> (org.apache.lucene.queryparser.classic.QueryParser)
>
> QueryParser parser = new QueryParser("test", new WhitespaceAnalyzer());
>
> parser.setDefaultOperator(QueryParser.Operator.AND);
> Query query = parser.parse("foo AND bar OR baz ");
> System.out.println(query.toString());
>
> parser.setDefaultOperator(QueryParser.Operator.OR);
> query = parser.parse("foo AND bar OR baz ");
> System.out.println(query.toString());
>
>
> I can also reproduce it on Elasticsearch 2.2 which uses Lucene 5.4.0
>
> $  curl -s 'localhost:9200/test/_search?pretty' -d '{ "query": {
> "query_string": { "query": "foo AND bar OR baz" , "default_operator": "and"
> } } , "profile" : true}' | grep luce
>   "lucene" : "+_all:foo _all:bar _all:baz",
> ...
>
> $ curl -s 'localhost:9200/test/_search?pretty' -d '{ "query": {
> "query_string": { "query": "foo AND bar OR baz" , "default_operator": "or"
> } } , "profile" : true}' | grep luce
>   "lucene" : "+_all:foo +_all:bar _all:baz",
> ...
>
> Elasticsearch uses class called MapperQueryParser which extends
> org.apache.lucene.queryparser.classic.QueryParser
>
> --
> Paweł Róg
>
> On Wed, Nov 9, 2016 at 6:10 PM, Dawid Weiss  wrote:
>
>> Which Lucene version and which query parser is this? Can you provide a
>> test case/ code sample?
>> I just tried with StandardQueryParser and for:
>>
>> sqp.setDefaultOperator(StandardQueryConfigHandler.Operator.AND);
>> dump(sqp.parse("foo AND bar OR baz", "field_a"));
>> sqp.setDefaultOperator(StandardQueryConfigHandler.Operator.OR);
>> dump(sqp.parse("foo AND bar OR baz", "field_a"));
>>
>> I get the same result:
>>
>> BooleanQuery: +field_a:foo +field_a:bar field_a:baz
>>
>> Dawid
>>
>> On Wed, Nov 9, 2016 at 6:04 PM, Pawel Rog  wrote:
>> > Hi Eric,
>> > Thank you for your email.
>> > I understand that Lucene queries are not in boolean logic. My point is
>> only
>> > that I would expect identical Lucene queries build from the same input
>> > string. My intuition says that default operator should not matter in 2
>> > examples I presented in previous email.
>> >
>> > --
>> > Paweł Róg
>> >
>> > On Wed, Nov 9, 2016 at 4:32 PM, Erick Erickson 
>> > wrote:
>> >
>> >> Lucene queries aren't boolean logic. You can simulate boolean logic by
>> >> explicitly parenthesizing, here's an excellent blog on this:
>> >>
>> >> https://lucidworks.com/blog/why-not-and-or-and-not/
>> >>
>> >> Best,
>> >> Erick
>> >>
>> >> On Wed, Nov 9, 2016 at 1:37 AM, Pawel Rog 
>> wrote:
>> >> > Hello ,
>> >> > I have a query `foo AND bar OR baz`. When I use "AND" as a default
>> >> operator
>> >> > this is the resulting Lucene  query:
>> >> >
>> >> > `+test:foo test:bar test:baz`
>> >> >
>> >> > When I use "OR" this is the resulting query
>> >> >
>> >> > `+test:foo +test:bar test:baz`
>> >> >
>> >> >
>> >> > I expected these two return exactly the same Lucene query because I
>> used
>> >> > operator explicitly. I thought that the default operator is used only
>> >> when
>> >> > operator is not explicitly mentioned in the query. Am I missing
>> something
>> >> > or this is not expected behavior (bug)?
>> >> >
>> >> > --
>> >> > Paweł Róg
>> >>
>> >> -
>> >> To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
>> >> For additional commands, e-mail: java-user-h...@lucene.apache.org
>> >>
>> >>
>>
>> -
>> To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
>> For additional commands, e-mail: java-user-h...@lucene.apache.org
>>
>>

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



RE: Migrate BooleanQuery Lucene 4.9.0 to Lucene 6.0.3

2016-11-10 Thread Oliver Kaleske
Hi,

try
BooleanQuery inner = new BooleanQuery.Builder().add(ownerQueryX, 
Occur.SHOULD).add(groupQueryY, Occur.SHOULD).build();
BooleanQuery constrainedQuery = new BooleanQuery.Builder().add(inner, 
Occur.MUST).add(query, Occur.MUST).build();

You can also split this into several statements if you prefer (probably a good 
idea if you have more than just those two sub-queries per BooleanQuery).

Best regards,
Oliver



-Original Message-
From: Humberto Rocha [mailto:humro...@gmail.com] 
Sent: Thursday, November 10, 2016 2:32 AM
To: java-user@lucene.apache.org
Subject: Migrate BooleanQuery Lucene 4.9.0 to Lucene 6.0.3

Hi,

In Lucene 4.9.0 i have:


QueryParser parser = new QueryParser("contents",analisador);
Query query = parser.parse(parametro);

BooleanQuery constrainedQuery = new BooleanQuery();
BooleanQuery inner = new BooleanQuery();
inner.add(ownerQueryX, Occur.SHOULD);
inner.add(groupQueryY, Occur.SHOULD);
constrainedQuery.add(inner, Occur.MUST);
constrainedQuery.add(query, Occur.MUST);


How migrate this to Lucene 6.0.3?

I saw BooleanQuery.Builder

but
i have problems to use.

Could someone help me please?

-- 
Humberto Rocha


Re: Faceting : what are the limitations of Taxonomy (Separate index and hierarchical facets) and SortedSetDocValuesFacetField ( flat facets and no sidecar index) ?

2016-11-10 Thread Shai Erera
Hi

The reason IMO is historic - ES and Solr had faceting solutions before
Lucene had it. There were discussions in the past about using the Lucene
faceting module in Solr (can't tell for ES) but, sadly, I can't say I see
it happening at this point.

Regarding your other question, IMO the Lucene faceting engine, in terms of
performance and customizability, is on par with Solr/ES. However, it lacks
distributed faceting support and aggregations. Since many people use
Solr/ES and not Lucene directly, the Solr/ES faceting module continues to
advance separately from the Lucene one.

Enhancing Lucene facets with aggregations and even distributed faceting
capabilities is mostly a matter of time and priorities. If you're
interested in it, I'd be willing to collaborate with you on that as much as
I can!

And I'd still hope that this work finds its way into Solr/ES, as I think
it's silly to have that many number of faceting implementations, where they
all rely on the same low-level data structure - Lucene!

Shai


On Thu, Nov 10, 2016 at 12:32 PM Kumaran Ramasubramanian 
wrote:

> Hi All,
> We all know that Lucene supports faceting by providing
> Taxonomy(Separate index and hierarchical facets) and
> SortedSetDocValuesFacetField ( flat facets and no sidecar index).
>
>   Then why did solr and elastic search go for its own implementation ?
>  ( that is, solr uses block join & elasticsearch uses aggregations ) Is
> there any limitations in lucene's implementation ?
>
>
> --
> Kumaran R
>


Faceting : what are the limitations of Taxonomy (Separate index and hierarchical facets) and SortedSetDocValuesFacetField ( flat facets and no sidecar index) ?

2016-11-10 Thread Kumaran Ramasubramanian
Hi All,
We all know that Lucene supports faceting by providing
Taxonomy(Separate index and hierarchical facets) and
SortedSetDocValuesFacetField ( flat facets and no sidecar index).

  Then why did solr and elastic search go for its own implementation ?
 ( that is, solr uses block join & elasticsearch uses aggregations ) Is
there any limitations in lucene's implementation ?


--
Kumaran R