Re: JSON facets and excluded queries

2015-11-25 Thread Yonik Seeley
Here's a little tutorial on multi-select faceting w/ the JSON Facet API:
http://yonik.com/multi-select-faceting/

-Yonik


On Tue, Nov 24, 2015 at 12:56 PM, Aigner, Max  wrote:
> I'm currently evaluating Solr 5.3.1 for performance improvements with 
> faceting.
> However, I'm unable to get the 'exclude-tagged-filters' feature to work. A 
> lot of the queries I'm doing are in the format
>
> ...?q=category:123={!tag=fqCol}color:green=true{!key=price_all
>  ex=fqCol}price{!key=price_nogreen}price...
>
> I couldn't find a way to make this work with JSON facets, the 'ex=' local 
> param doesn't seem to have a corresponding new parameter in JSON facets.
> Am I just missing something or is there a new recommended way for calculating 
> facets over a subset of filters?
>
> Thanks!
>


[Faceting] Exact Value Faceting VS ID Faceting

2015-11-25 Thread Alessandro Benedetti
Hi guys,
let's open a discussion :

*Use Case *:
A set of fields I use only for :
- exact search
- faceting

*Field Configuration*



I don't need norms, I don't need term freq and I don't need positions.
I do need the index for exact search.
I would like to have docValues because facets are going to be heavy on
those fields.
I like to store them.

*Faceting approach *
*1) *Indexing the human readable field value
Facets will be returned readable, out of the box.
I can not see any cons in this approach, I would say it is the standard one.

   - When building the docValues and flushing them to the disk, good
   compression algorithm are going to be used.
   - When calculating faceting, in memory it is used the ordinal for each
   term, which means in memory we don't waste space for the actual term, or
   waste the time looking up for the value until the very end of the process,
   after the counts are done .

*2)* Correlate outside the search system each term to a custom ID. Index
the custom ID. After facets are calculated resolve the ID and show the
human readable labels.

According to my knowledge in this way we are overcomplicating  the
situation.
We basically duplicate the effort in looking up for the facet values ( we
do internally in Lucene in the end of the faceting process : from Ordinal
to CustomID and we do it again from the CustomID to the value in the front
end)

The only apparent gain could be in term of disk space, but also in this
case I am not 100% sure that compressing a set of IDs will produce much
benefit in compressing the real values ( which can present repeated
sequence of characters for example) .

What are your consideration ?
Any additional pro/con ?

Cheers


-- 
--

Benedetti Alessandro
Visiting card : http://about.me/alessandro_benedetti

"Tyger, tyger burning bright
In the forests of the night,
What immortal hand or eye
Could frame thy fearful symmetry?"

William Blake - Songs of Experience -1794 England


Solrcloud with Zookeeper in production

2015-11-25 Thread Mugeesh Husain
Hello,

I am planing to configure solrcloud in production server,
i found one of link 
http://jayant7k.blogspot.in/2013/06/step-by-step-setting-up-solr-cloud.html.

I am stuck, i unable to find any article for production server with latest
version 5.


Please suggest me or give me appropriate link for latest version like 5 with
ZK

Thanks,
Mugeesh Husain 



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Solrcloud-with-Zookeeper-in-production-tp4242162.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: multiple table(how to index multiple table in solr)

2015-11-25 Thread Mugeesh Husain
Thanks you Erick Erickson.




--
View this message in context: 
http://lucene.472066.n3.nabble.com/multiple-table-how-to-index-multiple-table-in-solr-tp4241868p4242165.html
Sent from the Solr - User mailing list archive at Nabble.com.


SolrCloud 4.8.1 maxConnectionsPerHost

2015-11-25 Thread Vincenzo D'Amore
Hi all,

I have a SolrCloud cluster that is not scaling properly.
As far as I can see, reached a certain number of connection (maybe 30/40)
the cluster stops to until the running queries are completed.
And only then it starts to work on queue.
So the queue grows up and the waiting time become longer.
All the pending requests are handled but, after 10 seconds, all the
connections timed out.

Now I'm thinking to raise the number of concurrent worked connections.
Now having a look at solr cloud configuration, I see there should be a
shardHandler in solrconfig.xml.

But I was unable to find any parameter like   or even
maxConnectionsPerHost inside my configuration.

Where is current configuration? I have tried even with Jconsole, but
without success.

SolrCloud 4.8.1 is running in tomcat, should I configure tomcat instead of
Solrcloud?

Best regards,
Vincenzo D'Amore


-- 
Vincenzo D'Amore
email: v.dam...@gmail.com
skype: free.dev
mobile: +39 349 8513251


Re: SolrCloud 4.8.1 maxConnectionsPerHost

2015-11-25 Thread Erick Erickson
Often the limiting factor is, indeed, the Tomcat settings. Remember that
each Solr server has to talk to other Solr servers hosting shards, so
if you have 10 shards a single request requires 10 connections from
the aggregating node to the other shards so the total number of
connections can to up fast.

And bump it up quite high, 10,000 comes to mind but that might be
threads I'm thinking of...

Before you go there, though, if your Solr instances are pegging their
respective CPUs, then upping the max threads and/or connections
won't do much good, it's something to check first.

Best,
Erick

On Wed, Nov 25, 2015 at 3:29 PM, Vincenzo D'Amore  wrote:
> Hi all,
>
> I have a SolrCloud cluster that is not scaling properly.
> As far as I can see, reached a certain number of connection (maybe 30/40)
> the cluster stops to until the running queries are completed.
> And only then it starts to work on queue.
> So the queue grows up and the waiting time become longer.
> All the pending requests are handled but, after 10 seconds, all the
> connections timed out.
>
> Now I'm thinking to raise the number of concurrent worked connections.
> Now having a look at solr cloud configuration, I see there should be a
> shardHandler in solrconfig.xml.
>
> But I was unable to find any parameter like   or even
> maxConnectionsPerHost inside my configuration.
>
> Where is current configuration? I have tried even with Jconsole, but
> without success.
>
> SolrCloud 4.8.1 is running in tomcat, should I configure tomcat instead of
> Solrcloud?
>
> Best regards,
> Vincenzo D'Amore
>
>
> --
> Vincenzo D'Amore
> email: v.dam...@gmail.com
> skype: free.dev
> mobile: +39 349 8513251


Re: JSON facets and excluded queries

2015-11-25 Thread Alessandro Benedetti
Thank you very much Yonik !
Is this feature already in solr 5.3.1 ? ( didn't have the time to check yet
!)

Related the "wrong way" and "good way" in managing the filters according to
the multi selection, I definitely would like to see soon an OR fq.
Would be much easier to manage ( as we keep adding query params on
selection, instead of having to modify already built params)
Would be much better as we can reuse the cached filters.

I remember I read some work around ( if i am not wrong, was Mikhail work)
to achieve that, but would be much better to have it as a simple
alternative to AND filter queries.
I admit it is not an easy straightforward thing ( we can not simply have
another queryParam called orFq because in the multi selection scenario can
happen that we would need blocks of AND filter queries and within each
block possibly n orFq ) .
I will take look again to the old issues about this.

Cheers

On 25 November 2015 at 17:21, Yonik Seeley  wrote:

> Here's a little tutorial on multi-select faceting w/ the JSON Facet API:
> http://yonik.com/multi-select-faceting/
>
> -Yonik
>
>
> On Tue, Nov 24, 2015 at 12:56 PM, Aigner, Max 
> wrote:
> > I'm currently evaluating Solr 5.3.1 for performance improvements with
> faceting.
> > However, I'm unable to get the 'exclude-tagged-filters' feature to work.
> A lot of the queries I'm doing are in the format
> >
> >
> ...?q=category:123={!tag=fqCol}color:green=true{!key=price_all
> ex=fqCol}price{!key=price_nogreen}price...
> >
> > I couldn't find a way to make this work with JSON facets, the 'ex='
> local param doesn't seem to have a corresponding new parameter in JSON
> facets.
> > Am I just missing something or is there a new recommended way for
> calculating facets over a subset of filters?
> >
> > Thanks!
> >
>



-- 
--

Benedetti Alessandro
Visiting card : http://about.me/alessandro_benedetti

"Tyger, tyger burning bright
In the forests of the night,
What immortal hand or eye
Could frame thy fearful symmetry?"

William Blake - Songs of Experience -1794 England


RE: JSON facets and excluded queries

2015-11-25 Thread Aigner, Max
Yes, just tried that and it works fine. 

That just removed a showstopper for me as my queries contain lots of tagged FQs 
and multi-select facets (implemented the 'good way' :). 

Thank you for the quick help! 

-Original Message-
From: Yonik Seeley [mailto:ysee...@gmail.com] 
Sent: Wednesday, November 25, 2015 11:38 AM
To: solr-user@lucene.apache.org
Subject: Re: JSON facets and excluded queries

On Wed, Nov 25, 2015 at 2:29 PM, Yonik Seeley  wrote:
> On Wed, Nov 25, 2015 at 2:15 PM, Aigner, Max  wrote:
>> Thanks, this is great :=))
>>
>> I hadn't seen the domain:{excludeTags:...} syntax yet and it doesn't seem to 
>> be working on 5.3.1 so I'm assuming this is work slated for 5.4 or 6. Did I 
>> get that right?
>
> Hmmm, the "domain" keyword was added for 5.3 along with block join
> faceting: http://yonik.com/solr-nested-objects/
> That's when I switched "excludeTags" to also be under the "domain" keyword.
>
> Let me try it out...

Ah, I messed up that migration...
OK, for now, instead of
  domain:{excludeTags:foo}
just use
  excludeTags:foo
and it should work.

-Yonik


Re: JSON facets and excluded queries

2015-11-25 Thread Yonik Seeley
On Wed, Nov 25, 2015 at 2:15 PM, Aigner, Max  wrote:
> Thanks, this is great :=))
>
> I hadn't seen the domain:{excludeTags:...} syntax yet and it doesn't seem to 
> be working on 5.3.1 so I'm assuming this is work slated for 5.4 or 6. Did I 
> get that right?

Hmmm, the "domain" keyword was added for 5.3 along with block join
faceting: http://yonik.com/solr-nested-objects/
That's when I switched "excludeTags" to also be under the "domain" keyword.

Let me try it out...

-Yonik


Re: JSON facets and excluded queries

2015-11-25 Thread Yonik Seeley
OK, just fixed this in https://issues.apache.org/jira/browse/SOLR-8341
and that domain syntax will work in 5.4
I'll update my blog on multi-select faceting note that.

-Yonik

On Wed, Nov 25, 2015 at 2:37 PM, Yonik Seeley  wrote:
> On Wed, Nov 25, 2015 at 2:29 PM, Yonik Seeley  wrote:
>> On Wed, Nov 25, 2015 at 2:15 PM, Aigner, Max  
>> wrote:
>>> Thanks, this is great :=))
>>>
>>> I hadn't seen the domain:{excludeTags:...} syntax yet and it doesn't seem 
>>> to be working on 5.3.1 so I'm assuming this is work slated for 5.4 or 6. 
>>> Did I get that right?
>>
>> Hmmm, the "domain" keyword was added for 5.3 along with block join
>> faceting: http://yonik.com/solr-nested-objects/
>> That's when I switched "excludeTags" to also be under the "domain" keyword.
>>
>> Let me try it out...
>
> Ah, I messed up that migration...
> OK, for now, instead of
>   domain:{excludeTags:foo}
> just use
>   excludeTags:foo
> and it should work.
>
> -Yonik


[ANNOUNCE] CFP open for ApacheCon North America 2016

2015-11-25 Thread Rich Bowen
Community growth starts by talking with those interested in your
project. ApacheCon North America is coming, are you?

We are delighted to announce that the Call For Presentations (CFP) is
now open for ApacheCon North America. You can submit your proposed
sessions at
http://events.linuxfoundation.org/events/apache-big-data-north-america/program/cfp
for big data talks and
http://events.linuxfoundation.org/events/apachecon-north-america/program/cfp
for all other topics.

ApacheCon North America will be held in Vancouver, Canada, May 9-13th
2016. ApacheCon has been running every year since 2000, and is the place
to build your project communities.

While we will consider individual talks we prefer to see related
sessions that are likely to draw users and community members. When
submitting your talk work with your project community and with related
communities to come up with a full program that will walk attendees
through the basics and on into mastery of your project in example use
cases. Content that introduces what's new in your latest release is also
of particular interest, especially when it builds upon existing well
know application models. The goal should be to showcase your project in
ways that will attract participants and encourage engagement in your
community, Please remember to involve your whole project community (user
and dev lists) when building content. This is your chance to create a
project specific event within the broader ApacheCon conference.

Content at ApacheCon North America will be cross-promoted as
mini-conferences, such as ApacheCon Big Data, and ApacheCon Mobile, so
be sure to indicate which larger category your proposed sessions fit into.

Finally, please plan to attend ApacheCon, even if you're not proposing a
talk. The biggest value of the event is community building, and we count
on you to make it a place where your project community is likely to
congregate, not just for the technical content in sessions, but for
hackathons, project summits, and good old fashioned face-to-face networking.

-- 
rbo...@apache.org
http://apache.org/


Re: JSON facets and excluded queries

2015-11-25 Thread Yonik Seeley
On Wed, Nov 25, 2015 at 2:29 PM, Yonik Seeley  wrote:
> On Wed, Nov 25, 2015 at 2:15 PM, Aigner, Max  wrote:
>> Thanks, this is great :=))
>>
>> I hadn't seen the domain:{excludeTags:...} syntax yet and it doesn't seem to 
>> be working on 5.3.1 so I'm assuming this is work slated for 5.4 or 6. Did I 
>> get that right?
>
> Hmmm, the "domain" keyword was added for 5.3 along with block join
> faceting: http://yonik.com/solr-nested-objects/
> That's when I switched "excludeTags" to also be under the "domain" keyword.
>
> Let me try it out...

Ah, I messed up that migration...
OK, for now, instead of
  domain:{excludeTags:foo}
just use
  excludeTags:foo
and it should work.

-Yonik


RE: JSON facets and excluded queries

2015-11-25 Thread Aigner, Max
Thanks, this is great :=))

I hadn't seen the domain:{excludeTags:...} syntax yet and it doesn't seem to be 
working on 5.3.1 so I'm assuming this is work slated for 5.4 or 6. Did I get 
that right? 

Thanks,
Max

-Original Message-
From: Yonik Seeley [mailto:ysee...@gmail.com] 
Sent: Wednesday, November 25, 2015 9:21 AM
To: solr-user@lucene.apache.org
Subject: Re: JSON facets and excluded queries

Here's a little tutorial on multi-select faceting w/ the JSON Facet API:
http://yonik.com/multi-select-faceting/

-Yonik


On Tue, Nov 24, 2015 at 12:56 PM, Aigner, Max  wrote:
> I'm currently evaluating Solr 5.3.1 for performance improvements with 
> faceting.
> However, I'm unable to get the 'exclude-tagged-filters' feature to work. A 
> lot of the queries I'm doing are in the format
>
> ...?q=category:123={!tag=fqCol}color:green=true{!key=price_all
>  ex=fqCol}price{!key=price_nogreen}price...
>
> I couldn't find a way to make this work with JSON facets, the 'ex=' local 
> param doesn't seem to have a corresponding new parameter in JSON facets.
> Am I just missing something or is there a new recommended way for calculating 
> facets over a subset of filters?
>
> Thanks!
>


URL Encoding on Import

2015-11-25 Thread Teague James
Hi everyone!

Does anyone have any suggestions on how to URL encode URLs that I'm
importing from SQL using the DIH? The importer pulls in something like
"http://www.downloadsite.com/document that is being downloaded.doc" and then
the Tika parser can't download the document because it ends up trying to
access "http://www.downloadsite.com/document; and gets a 404 error. What I
need to do is transform the URL to
"http://www.downloadsite.com/document%20that%20is%20being%20downloaded.doc;
I added a regex transformer to the DIH field, but I have not found a
successful regex to accomplish this. Thoughts? 

Any advice would be appreciated! Thanks!

-Teague



Re: Solrcloud with Zookeeper in production

2015-11-25 Thread Erick Erickson
What have you tried and what hasn't worked? Have you worked
though the reference guided for getting started with Solr Cloud?
See:
https://cwiki.apache.org/confluence/display/solr/SolrCloud

Best,
Erick

On Wed, Nov 25, 2015 at 8:23 AM, Mugeesh Husain  wrote:
> Hello,
>
> I am planing to configure solrcloud in production server,
> i found one of link
> http://jayant7k.blogspot.in/2013/06/step-by-step-setting-up-solr-cloud.html.
>
> I am stuck, i unable to find any article for production server with latest
> version 5.
>
>
> Please suggest me or give me appropriate link for latest version like 5 with
> ZK
>
> Thanks,
> Mugeesh Husain
>
>
>
> --
> View this message in context: 
> http://lucene.472066.n3.nabble.com/Solrcloud-with-Zookeeper-in-production-tp4242162.html
> Sent from the Solr - User mailing list archive at Nabble.com.


Re: Probelm with Deleting child document

2015-11-25 Thread Mikhail Khludnev
It's known issue https://issues.apache.org/jira/browse/SOLR-5211

I wish to address it in scope of
https://issues.apache.org/jira/browse/SOLR-7672, but I'm blocked by code
review for https://issues.apache.org/jira/browse/SOLR-7606


On Wed, Nov 25, 2015 at 5:17 PM, Novin  wrote:

> Hi Guys,
>
> I am having problem to deleting last child document.
>
> Parent product01 has child part01, part02.  When update product01 with
> only child part01, It is fine. but when I tried to update parent01 with no
> child,it still has part01. It is OK I didn't tell solr to delete the last
> child or product01 has no child.
>
> Can Solr would be able to do, if I update parent with no child it will get
> rid of all child document of parent document?
>
> Cheers,
> Novin
>
>
>
>
>


-- 
Sincerely yours
Mikhail Khludnev
Principal Engineer,
Grid Dynamics





Re: [Edismax] * escaping

2015-11-25 Thread Alessandro Benedetti
Hi Shawn,
thank you very much!
I was thinking the debug "parsed query" was showing the "post parsing, pre
analysis" queries.
But actually it shows the post analysis.

Cheers


On 24 November 2015 at 17:49, Shawn Heisey  wrote:

> On 11/24/2015 9:31 AM, Alessandro Benedetti wrote:
> > I was wondering how can I escape the '*' character to explicitly look for
> > it instead of using it as a wildcard.
>
> 
>
> > *rawquerystring*": "a\\*b",
> > "*querystring*": "a\\*b",
> > "*parsedquery*": "BoostedQuery(boost(+((area:a area:b) |
> >  ((country:a country:b)^5.0) |
> > ((resort:a resort:b)^15.0) |
> >  ((region:a region:b)^10.0)),
> > sum(const(1),product(const(1),int(popularity)",
> >
> >
> > It seems *edismax* is converting the * to a space that causes a
> disjunction.
>
> It is not edismax that is changing the asterisk.  It is the query
> analysis on the fields named area, country, resort, and region.
> Escaping the character prevented the query parser from treating it as a
> wildcard, so it was passed on to the query analyzer, which likely
> includes a tokenizer or filter that splits tokens on punctuation.
>
> Thanks,
> Shawn
>
>


-- 
--

Benedetti Alessandro
Visiting card : http://about.me/alessandro_benedetti

"Tyger, tyger burning bright
In the forests of the night,
What immortal hand or eye
Could frame thy fearful symmetry?"

William Blake - Songs of Experience -1794 England


Solr Date Format

2015-11-25 Thread Salman Ansari
Hi,

I was exploring Solr date formats and came across the following link
https://cwiki.apache.org/confluence/display/solr/Working+with+Dates

which specifies that the date format in Solr is as -MM-DDThh:mm:ssZ
I was wondering if

1) Solr support other date formats?
2) Solr supports other calendars such as Hijri calendar?

Regards,
Salman


Use dataimporthandler cache with stored procedures

2015-11-25 Thread Jean-Philippe Quéméner
Hi,
I'm trying to import my data from an sql database using the
dataimporthandler. For some nested entity I want to use the cache to cache
the result of my stored procedure. My config looks like this


>
>   
>   
>   
>cacheLookup="product.brand_id" cacheImpl="SortedMapBackedCache">
> 
> 
> 
> 
>   
>   
> 
>   
>
>
For some reason the cache only save the first result and doesn't show the
entity in all other documents having a different brand_id.

I have around 300 different brand_id's so I would expect at least 300
queries to the database but only the first one is made

Am I missing something? .


Re: Sold 4.10.4 dropping index on shutdown

2015-11-25 Thread Oliver Schrenk
It will take a while before we try out 4.10 again. We might just jump directly 
to Solr 5 (waiting for some fixes regarding faceting).

One thing I noticed today that luceneMatchVersion was still set to 4.7 and not 
to 4.10.4. But I would expect Solr 4.10 to handle this.

> On 23 Nov 2015, at 12:21, Upayavira  wrote:
> 
> Can you confirm that the indexes *are* in place on disk before you shut
> down? Whilst it may seem like indexes are being removed, this would seem
> extremely unlikely, and the explanation is likely something else.
> 
> Try looking at your index files, post some content, commit, look again
> at your index files, then shut down. What changes have you seen? Did the
> commit 'take' and cause the files to be written?
> 
> Upayavira
> 
> On Mon, Nov 23, 2015, at 10:25 AM, Oliver Schrenk wrote:
>> Yes. Hard commit using SolrJ 4.10.4 client with UpdateResponse.commit()
>> which defaults to waitFlush=true and waitSearcher=true
>> 
>> We reverted back to Solr 4.7 for the time being, which is a pity as we
>> really benefitted from the concurrent commit fix.
>> 
>>> On 17 Nov 2015, at 18:00, Erick Erickson  wrote:
>>> 
>>> Did you commit after indexing and before shutting down? Even if you didn't, 
>>> I'm
>>> still a bit surprised, but that's one possible explanation.
>>> 
>>> But this is the first time I've seen this problem mentioned...
>>> 
>>> Best,
>>> Erick
>>> 
>>> On Tue, Nov 17, 2015 at 4:08 AM, Oliver Schrenk  wrote:
 Hi,
 
 since we upgraded our cluster from 4.7 to 4.10.4 we are experiencing 
 issues. When shutting down the service (with a confirmed graceful shutdown 
 in the logs), the index is dropped, with only one lonely `segments.gen` 
 file left for each shard and all other files being deleted.
 
 There is no message in the logs, other than graceful shutdown. Did anybody 
 have a similar issues and has some advice?
 
 Cheers,
 Oliver
>> 



Re: Use dataimporthandler cache with stored procedures

2015-11-25 Thread Mikhail Khludnev
Hello Jean-Philippe,

You either call it 300 times with the different param value, without cache


or load all rows once and cache them
 

SQL examples in the doc explain this clear, I suppose.

On Wed, Nov 25, 2015 at 2:27 PM, Jean-Philippe Quéméner <
jeanphilippe.queme...@gmail.com> wrote:

> Hi,
> I'm trying to import my data from an sql database using the
> dataimporthandler. For some nested entity I want to use the cache to cache
> the result of my stored procedure. My config looks like this
>
> 
> >
> >   
> >   
> >   
> >cacheLookup="product.brand_id" cacheImpl="SortedMapBackedCache">
> > 
> > 
> > 
> > 
> >   
> >   
> > 
> >   
> >
> >
> For some reason the cache only save the first result and doesn't show the
> entity in all other documents having a different brand_id.
>
> I have around 300 different brand_id's so I would expect at least 300
> queries to the database but only the first one is made
>
> Am I missing something? .
>



-- 
Sincerely yours
Mikhail Khludnev
Principal Engineer,
Grid Dynamics





Re: Solr Date Format

2015-11-25 Thread Alexandre Rafalovitch
Solr internally only supports that format. However, it is possible to
use an UpdateRequestProcessor to pre-process other formats. That's
what happening when you are using the "schemaless" mode:
https://github.com/apache/lucene-solr/blob/lucene_solr_5_3_1/solr/example/files/conf/solrconfig.xml#L1356

You don't need to use the whole schemaless mode, you can just add the
individual URP in a chain to your own handler. You can find the full
list of URPs at:
http://www.solr-start.com/info/update-request-processors/ . As of a
week ago, I added cross-links from the definitions to the mentions, so
jumping around should be even easier now.

Regarding Hiriji, it is a little more complicated. Joda time, which is
what  ParseDateFieldUpdateProcessorFactory uses does support hijiri ,
but it does not seem to be exposed through the URP. But it is probably
not too hard to clone the URP to your custom implementation and just
force it to the IslamicChronology:
http://joda-time.sourceforge.net/apidocs/index.html?org/joda/time/format/package-summary.html

Newsletter and resources for Solr beginners and intermediates:
http://www.solr-start.com/


On 25 November 2015 at 06:56, Salman Ansari  wrote:
> Hi,
>
> I was exploring Solr date formats and came across the following link
> https://cwiki.apache.org/confluence/display/solr/Working+with+Dates
>
> which specifies that the date format in Solr is as -MM-DDThh:mm:ssZ
> I was wondering if
>
> 1) Solr support other date formats?
> 2) Solr supports other calendars such as Hijri calendar?
>
> Regards,
> Salman


Re: Querying nested datastructures

2015-11-25 Thread István
Hi Jack,

Thank you very much, I am going to for this as the primary solution.

Regards,
Istvan

On Tue, Nov 24, 2015 at 1:56 PM, Jack Krupansky 
wrote:

> The primary recommendation is that you flatten nested documents.
>
> That means one Solr document per cpc, not multivalued.
>
> As always, queries should drive your data model, so please specify what a
> typical query might be like, in plain English.
>
> -- Jack Krupansky
>
> On Tue, Nov 24, 2015 at 4:39 AM, István  wrote:
>
> > Hi all,
> >
> > I would like to find documents in a key-value store (Riak) with Solr and
> I
> > am running into a challenge. I have nested JSON documents with patent
> > information. Patents have a one or many CPC (
> > http://www.cooperativepatentclassification.org/index.html) codes
> something
> > like these:
> >
> > {
> >
> > // more data
> >
> > "cpc": [
> > {
> >   "class": "61",
> >   "section": "A",
> >   "sequence": "1",
> >   "subclass": "K",
> >   "subgroup": "06",
> >   "main-group": "45",
> >   "classification-value": "I"
> > },
> > {
> >   "class": "61",
> >   "section": "A",
> >   "sequence": "2",
> >   "subclass": "K",
> >   "subgroup": "506",
> >   "main-group": "31",
> >   "classification-value": "I"
> > }
> > ]
> >
> > }
> >
> > I would like to find the documents that match to a certain CPC code,
> > sometimes with partial code sometimes with the full code. I used the
> > following schema to index the documents:
> >
> >  > stored="true" multiValued="true" />
> >  > stored="true" multiValued="true" />
> >  > stored="true" multiValued="true" />
> >  > stored="true" multiValued="true" />
> >  > stored="true" multiValued="true" />
> >  > stored="true" multiValued="true" />
> >  > stored="true" multiValued="true" />
> >
> >
> > The problem with this approach is that when we query a certain
> combination
> > of partial CPC codes it returns document that don't actually match that
> > combination.
> >
> > This behavior described in this blog post:
> >
> >
> >
> http://blog.griddynamics.com/2011/06/solr-experience-search-parent-child.html
> >
> > My understanding is that I need to apply termPositions=”true” to the
> field
> > definition and than Solr maintains the position information and it will
> > return only the documents that actually match the combination of the
> > partial CPC codes. Am I on the right track with this or there is a better
> > solution to query nested documents with partial codes?
> >
> > Thank you in advance,
> > Istvan
> >
> > PS: I also posted this on Stackoverflow:
> >
> >
> http://stackoverflow.com/questions/33724556/how-to-index-an-array-of-hashes-with-solr
> >
> > --
> > the sun shines for all
> >
>



-- 
the sun shines for all


Re: [Edismax] * escaping

2015-11-25 Thread Jack Krupansky
Yeah, this stuff is poorly documented, not very intuitive, and the
terminology is poorly designed in the first place, so it's completely
expected to easily get confused by it. Not even a mention of it in the Solr
reference guide.

-- Jack Krupansky

On Wed, Nov 25, 2015 at 4:39 AM, Alessandro Benedetti  wrote:

> Hi Shawn,
> thank you very much!
> I was thinking the debug "parsed query" was showing the "post parsing, pre
> analysis" queries.
> But actually it shows the post analysis.
>
> Cheers
>
>
> On 24 November 2015 at 17:49, Shawn Heisey  wrote:
>
> > On 11/24/2015 9:31 AM, Alessandro Benedetti wrote:
> > > I was wondering how can I escape the '*' character to explicitly look
> for
> > > it instead of using it as a wildcard.
> >
> > 
> >
> > > *rawquerystring*": "a\\*b",
> > > "*querystring*": "a\\*b",
> > > "*parsedquery*": "BoostedQuery(boost(+((area:a area:b) |
> > >  ((country:a country:b)^5.0) |
> > > ((resort:a resort:b)^15.0) |
> > >  ((region:a region:b)^10.0)),
> > > sum(const(1),product(const(1),int(popularity)",
> > >
> > >
> > > It seems *edismax* is converting the * to a space that causes a
> > disjunction.
> >
> > It is not edismax that is changing the asterisk.  It is the query
> > analysis on the fields named area, country, resort, and region.
> > Escaping the character prevented the query parser from treating it as a
> > wildcard, so it was passed on to the query analyzer, which likely
> > includes a tokenizer or filter that splits tokens on punctuation.
> >
> > Thanks,
> > Shawn
> >
> >
>
>
> --
> --
>
> Benedetti Alessandro
> Visiting card : http://about.me/alessandro_benedetti
>
> "Tyger, tyger burning bright
> In the forests of the night,
> What immortal hand or eye
> Could frame thy fearful symmetry?"
>
> William Blake - Songs of Experience -1794 England
>


Probelm with Deleting child document

2015-11-25 Thread Novin

Hi Guys,

I am having problem to deleting last child document.

Parent product01 has child part01, part02.  When update product01 with 
only child part01, It is fine. but when I tried to update parent01 with 
no child,it still has part01. It is OK I didn't tell solr to delete the 
last child or product01 has no child.


Can Solr would be able to do, if I update parent with no child it will 
get rid of all child document of parent document?


Cheers,
Novin






Re: Querying nested datastructures

2015-11-25 Thread István
Hi Mikhail,

Thank you very much for the info, it is very informative. I am going
through the links you sent.

Best regards,
Istvan



On Tue, Nov 24, 2015 at 7:48 PM, Mikhail Khludnev <
mkhlud...@griddynamics.com> wrote:

> Hello Istvan,
>
> - when flattern subdocs, you can concatenate its' fields which are
> necessary for retrieval, eg "K-06-45", it solves retrieval, but isn't
> really flexible.
> - term positions is not easier to implement, if you really prefer this way
> I'd suggest to look on http://siren.solutions/siren/overview/ I haven't
> tried it, but it sounds like they implemented this approach.
> - if you follow recent blog post, you see our favorite approach
> http://blog.griddynamics.com/2013/09/solr-block-join-support.html
>
> Also, query time join {!join} and field collapsing are also alternatives to
> consider.
>
>
> On Tue, Nov 24, 2015 at 12:39 PM, István  wrote:
>
> > Hi all,
> >
> > I would like to find documents in a key-value store (Riak) with Solr and
> I
> > am running into a challenge. I have nested JSON documents with patent
> > information. Patents have a one or many CPC (
> > http://www.cooperativepatentclassification.org/index.html) codes
> something
> > like these:
> >
> > {
> >
> > // more data
> >
> > "cpc": [
> > {
> >   "class": "61",
> >   "section": "A",
> >   "sequence": "1",
> >   "subclass": "K",
> >   "subgroup": "06",
> >   "main-group": "45",
> >   "classification-value": "I"
> > },
> > {
> >   "class": "61",
> >   "section": "A",
> >   "sequence": "2",
> >   "subclass": "K",
> >   "subgroup": "506",
> >   "main-group": "31",
> >   "classification-value": "I"
> > }
> > ]
> >
> > }
> >
> > I would like to find the documents that match to a certain CPC code,
> > sometimes with partial code sometimes with the full code. I used the
> > following schema to index the documents:
> >
> >  > stored="true" multiValued="true" />
> >  > stored="true" multiValued="true" />
> >  > stored="true" multiValued="true" />
> >  > stored="true" multiValued="true" />
> >  > stored="true" multiValued="true" />
> >  > stored="true" multiValued="true" />
> >  > stored="true" multiValued="true" />
> >
> >
> > The problem with this approach is that when we query a certain
> combination
> > of partial CPC codes it returns document that don't actually match that
> > combination.
> >
> > This behavior described in this blog post:
> >
> >
> >
> http://blog.griddynamics.com/2011/06/solr-experience-search-parent-child.html
> >
> > My understanding is that I need to apply termPositions=”true” to the
> field
> > definition and than Solr maintains the position information and it will
> > return only the documents that actually match the combination of the
> > partial CPC codes. Am I on the right track with this or there is a better
> > solution to query nested documents with partial codes?
> >
> > Thank you in advance,
> > Istvan
> >
> > PS: I also posted this on Stackoverflow:
> >
> >
> http://stackoverflow.com/questions/33724556/how-to-index-an-array-of-hashes-with-solr
> >
> > --
> > the sun shines for all
> >
>
>
>
> --
> Sincerely yours
> Mikhail Khludnev
> Principal Engineer,
> Grid Dynamics
>
> 
> 
>



-- 
the sun shines for all