AW: TimeZones

2024-05-17 Thread Dario.Viva
Hi Hoss

I feel so stupid right now, thank you so much!
Of course this makes much more sense. Why should we want to have different 
Timezones for different facets. Hopefully I don't come across as being 
sarcastic, I really think that it makes more sense that it's a global modifier.
After reading the Documentation again it is clear that TZ should not be 
specified on a per facet level.
It is clearly specified in the documentation:
[.]&facet.range.gap=%2B1DAY&TZ=America/Los_Angeles&wt=xml
as opposed to
[.]&facet.range.gap=%2B1DAY&facet.range.TZ=America/Los_Angeles&wt=xml

Now I am good to go, but one very small problem I still have:
I could just send http requests as fallowing:

---

GET https:///solr//query?TZ=Europe/Zurich 
Accept: application/json
Content-Type: application/json

{
"query": "*:*",
"limit": 0,
"facet": {
"series": {
"field": "",
"gap": "+1MONTH",
"start": "2024-01-01T00:00:00Z/MONTH",
"end": "2024-07-01T00:00:00Z",
"type": "range"
}
}
}

---

But I am not able to make it work when specifying all in the json body:

---

GET https:///solr//query
Accept: application/json
Content-Type: application/json

{
"query": "*:*",
"limit": 0,
"facet": {
"series": {
"field": "",
"gap": "+1MONTH",
"start": "2024-01-01T00:00:00Z/MONTH",
"end": "2024-07-01T00:00:00Z",
"type": "range"
}
},
"TZ", "Europe/Zurich"
}

---

I get a response with the fallowing json:

---

"error": {
"metadata": [
"error-class",
"org.apache.solr.common.SolrException",
"root-error-class",
"org.apache.solr.common.SolrException"
],
"msg": "Unknown top-level key in JSON request : TZ",
"code": 400
}

---

I again tried it with all possible similar key names: tz, timezone, time-zone & 
time_zone

Don't get me wrong, I am still very grateful for the help that you gave me, 
even if its not possible to specify the TZ in the json body I still know now 
how to use different time zones.

With Kind Regards,

Dario


[Community Over Code EU] Bratislava, June 3-5, 2024

2024-05-17 Thread Alessandro Benedetti
Hi all,
just a reminder that the first Community Over Code European conference is
approaching!

There will be various Search-related talks on both Apache Lucene and Solr,
probably also a Birds of a Feather session (that we found extremely useful
in the most recent community over code and ApacheCon) and a lot of
networking!

Tickets are available on the official website:
https://eu.communityovercode.org

In addition, in partnership with and during the conference, we (Sease) are
organising a training session on the day after the Search track:

https://sease.io/training/the-ai-side-of-apache-lucene-solr-8211-community-over-code-training

The scope of the workshop is to explore all the latest functionalities
around AI in the Apache Lucene and Solr world.
*N.B.* The conference ticket is necessary to attend the course and it is
not included in the price of the training.

Cheers
--
*Alessandro Benedetti*
Director @ Sease Ltd.
*Apache Lucene/Solr Committer*
*Apache Solr PMC Member*

e-mail: a.benede...@sease.io


*Sease* - Information Retrieval Applied
Consulting | Training | Open Source

Website: Sease.io 
LinkedIn  | Twitter
 | Youtube
 | Github



回复: solr search is not working when we use `WhitespaceTokenizerFactory` and wanted to search chinese character

2024-05-17 Thread Shi Jinghai
Hi Vishal,

When searching Chinese, you have to use a proper parser to parse the Chinese 
characters to be space seperated, for example in the case you mentioned:

Original query text: (第二期)
Parsed query text: ( 第 二 期 )

In English for better understood:
Original query text: (TheSecondTerm)
Parsed query text: ( The Second Term )

As you see, TheSencondTerm is not indexed and cannot be searched, neither (第二期).

Now you can get the right results, as Lucene behind has indexed each Chinese 
character as a word (in English concept) and works perfect.

Regards,

Shi Jinghai


发件人: Vishal Patel 
发送时间: 2024年5月17日 12:33
收件人: users@solr.apache.org 
主题: solr search is not working when we use `WhitespaceTokenizerFactory` and 
wanted to search chinese character

I do have solr schema configuration for field "test" having "text" type and for 
it we have used solr.WhitespaceTokenizerFactory
Now data get indexed in solr for this "test" field but when we try to search 
it, I am not able to get result using solr query like below

field:((第二期)) /  field:((第二期)*)

For example: input value : (第二期) being index but when we try to search it than 
not able to get result.
I have tried to use solr.ShingleFilterFactory using query analyser but won't 
help here.
Any suggestions to fix the same ?
Thanks in advance !

Regards,
Vishal Patel


Re: AW: TimeZones

2024-05-17 Thread Chris Hostetter


: I feel so stupid right now, thank you so much! Of course this makes much 
: more sense. Why should we want to have different Timezones for different 
: facets. Hopefully I don't come across as being sarcastic, I really think 
: that it makes more sense that it's a global modifier.

It's not just about the facets though -- it (and "NOW") have to uniformly 
affect anywhere "date math" might be used (like in query parsers) across 
the entire request.

: But I am not able to make it work when specifying all in the json body:

I do't really use the JSON query, but I know it only supports a very 
limited set of top level keys (which are not always consistent with normal 
request params because up is down and left is right and somebody just 
felt like it)...

https://solr.apache.org/guide/solr/latest/query-guide/json-request-api.html#supported-properties-and-syntax

...the really important bit is the sentence below that table, and the curl 
example...

"Parameters not specified in the table above can still be used in the main 
body of JSON API requests, but they must be put within a params block as 
shown in the example below."



-Hoss
http://www.lucidworks.com/


Re: How to use docValuesFormat="Direct" with Solr 9.6.0 ?

2024-05-17 Thread Chris Hostetter


This codec format was completley removed from Lucene in 9.0...

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

...I'm not enough of a codec expert to be able to explain why, but it's no 
longer an option in Solr at all.


-Hoss
http://www.lucidworks.com/


Re: How to use docValuesFormat="Direct" with Solr 9.6.0 ?

2024-05-17 Thread Alex The Rocker
Hello Hoss,

Thank you very much for having taken time to answer, at least it
explains why docValuesFormat="Direct" is not usable with lucene9 with
Solr 9.x.

Would this option be usable with Solr 9.6.0 if I re-create my
collections with 8.11.3 ?

My goal is to check if the performance issues (mostly on bulk updates)
which I meet when moving from 8.11.3 to 9.6.0 could be related to his
missing docValuesFormat="Direct".

Thanks,
Alex

Le sam. 18 mai 2024 à 00:57, Chris Hostetter
 a écrit :
>
>
> This codec format was completley removed from Lucene in 9.0...
>
> https://issues.apache.org/jira/browse/LUCENE-8917
>
> ...I'm not enough of a codec expert to be able to explain why, but it's no
> longer an option in Solr at all.
>
>
> -Hoss
> http://www.lucidworks.com/