Solr Java-API Question

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

Solr Java-API Question

Johannes Ruscheinski

Hi,


I have the following problem:


My "documents" have a field that contains one or more 2D intervals (mostly it is a single interval).  I have queries that consist of one or more intervals (also most of the queries consist of a single interval).  I need to generate a list of document IDs that have at least a partial overlap with one of the intervals contained in the query.  The ranking needs to be implemented by me.

I do know Java but I know virtually nothing about the Solr API.  If there is a more appropriate mailing list to ask such a question, I apologize and ask that someone would point it out, please.

Thanks!


Johannes

-- 
Dr. Johannes Ruscheinski
Universitätsbibliothek Tübingen - IT-Abteilung -
Wilhelmstr. 32, 72074 Tübingen

Tel: +49 7071 29-72820
FAX: +49 7071 29-5069

 The Sophisticate:  "The world isn't black and white.  No one does pure good or pure bad. It's all gray.  Therefore, no one is better than anyone else."
    The Zetet:  "Knowing only gray, you conclude that all grays are the same shade.  You mock the simplicity of the two-color view, yet you replace it with a one-color view..."
      —Marc Stiegler, David's Sling

Reply | Threaded
Open this post in threaded view
|

Re: Solr Java-API Question

david.w.smiley@gmail.com
Hi,

The first two paragraphs essentially cover it: use DateRangeField (even for integers).

~ David


On Tue, May 19, 2020 at 9:59 AM Ruscheinski, Johannes <[hidden email]> wrote:

Hi,


I have the following problem:


My "documents" have a field that contains one or more 2D intervals (mostly it is a single interval).  I have queries that consist of one or more intervals (also most of the queries consist of a single interval).  I need to generate a list of document IDs that have at least a partial overlap with one of the intervals contained in the query.  The ranking needs to be implemented by me.

I do know Java but I know virtually nothing about the Solr API.  If there is a more appropriate mailing list to ask such a question, I apologize and ask that someone would point it out, please.

Thanks!


Johannes

-- 
Dr. Johannes Ruscheinski
Universitätsbibliothek Tübingen - IT-Abteilung -
Wilhelmstr. 32, 72074 Tübingen

Tel: +49 7071 29-72820
FAX: +49 7071 29-5069

 The Sophisticate:  "The world isn't black and white.  No one does pure good or pure bad. It's all gray.  Therefore, no one is better than anyone else."
    The Zetet:  "Knowing only gray, you conclude that all grays are the same shade.  You mock the simplicity of the two-color view, yet you replace it with a one-color view..."
      —Marc Stiegler, David's Sling

Reply | Threaded
Open this post in threaded view
|

Re: Solr Java-API Question

Johannes Ruscheinski

Hi David,


thanks for the advice.  I hope I get the necessary resolution this way.  As I understand the recommendation it is to use seconds.  I think we need 9 decimal places.  So that's 10^9 s which is not quite 32 years.  Also how do I issue my intersection queries at the Java API level once I have populated the DateRange fields?


Johannes

-- 
Dr. Johannes Ruscheinski
Universitätsbibliothek Tübingen - IT-Abteilung -
Wilhelmstr. 32, 72074 Tübingen

Tel: +49 7071 29-72820
FAX: +49 7071 29-5069

 The Sophisticate:  "The world isn't black and white.  No one does pure good or pure bad. It's all gray.  Therefore, no one is better than anyone else."
    The Zetet:  "Knowing only gray, you conclude that all grays are the same shade.  You mock the simplicity of the two-color view, yet you replace it with a one-color view..."
      —Marc Stiegler, David's Sling


From: David Smiley <[hidden email]>
Sent: 19 May 2020 16:17:38
To: Solr/Lucene Dev
Subject: Re: Solr Java-API Question
 
Hi,

The first two paragraphs essentially cover it: use DateRangeField (even for integers).

~ David


On Tue, May 19, 2020 at 9:59 AM Ruscheinski, Johannes <[hidden email]> wrote:

Hi,


I have the following problem:


My "documents" have a field that contains one or more 2D intervals (mostly it is a single interval).  I have queries that consist of one or more intervals (also most of the queries consist of a single interval).  I need to generate a list of document IDs that have at least a partial overlap with one of the intervals contained in the query.  The ranking needs to be implemented by me.

I do know Java but I know virtually nothing about the Solr API.  If there is a more appropriate mailing list to ask such a question, I apologize and ask that someone would point it out, please.

Thanks!


Johannes

-- 
Dr. Johannes Ruscheinski
Universitätsbibliothek Tübingen - IT-Abteilung -
Wilhelmstr. 32, 72074 Tübingen

Tel: +49 7071 29-72820
FAX: +49 7071 29-5069

 The Sophisticate:  "The world isn't black and white.  No one does pure good or pure bad. It's all gray.  Therefore, no one is better than anyone else."
    The Zetet:  "Knowing only gray, you conclude that all grays are the same shade.  You mock the simplicity of the two-color view, yet you replace it with a one-color view..."
      —Marc Stiegler, David's Sling

Reply | Threaded
Open this post in threaded view
|

Re: Solr Java-API Question

Johannes Ruscheinski

Hi again,


we originally thought that LongPointField was what we might have to go with.  Is that the wrong field type because it doesn't support intersection with multiple ranges simultaneously whereas the DateRangeField does?


Johannes

-- 
Dr. Johannes Ruscheinski
Universitätsbibliothek Tübingen - IT-Abteilung -
Wilhelmstr. 32, 72074 Tübingen

Tel: +49 7071 29-72820
FAX: +49 7071 29-5069

 The Sophisticate:  "The world isn't black and white.  No one does pure good or pure bad. It's all gray.  Therefore, no one is better than anyone else."
    The Zetet:  "Knowing only gray, you conclude that all grays are the same shade.  You mock the simplicity of the two-color view, yet you replace it with a one-color view..."
      —Marc Stiegler, David's Sling


From: Ruscheinski, Johannes <[hidden email]>
Sent: 20 May 2020 09:25:16
To: [hidden email]
Subject: Re: Solr Java-API Question
 

Hi David,


thanks for the advice.  I hope I get the necessary resolution this way.  As I understand the recommendation it is to use seconds.  I think we need 9 decimal places.  So that's 10^9 s which is not quite 32 years.  Also how do I issue my intersection queries at the Java API level once I have populated the DateRange fields?


Johannes

-- 
Dr. Johannes Ruscheinski
Universitätsbibliothek Tübingen - IT-Abteilung -
Wilhelmstr. 32, 72074 Tübingen

Tel: +49 7071 29-72820
FAX: +49 7071 29-5069

 The Sophisticate:  "The world isn't black and white.  No one does pure good or pure bad. It's all gray.  Therefore, no one is better than anyone else."
    The Zetet:  "Knowing only gray, you conclude that all grays are the same shade.  You mock the simplicity of the two-color view, yet you replace it with a one-color view..."
      —Marc Stiegler, David's Sling


From: David Smiley <[hidden email]>
Sent: 19 May 2020 16:17:38
To: Solr/Lucene Dev
Subject: Re: Solr Java-API Question
 
Hi,

The first two paragraphs essentially cover it: use DateRangeField (even for integers).

~ David


On Tue, May 19, 2020 at 9:59 AM Ruscheinski, Johannes <[hidden email]> wrote:

Hi,


I have the following problem:


My "documents" have a field that contains one or more 2D intervals (mostly it is a single interval).  I have queries that consist of one or more intervals (also most of the queries consist of a single interval).  I need to generate a list of document IDs that have at least a partial overlap with one of the intervals contained in the query.  The ranking needs to be implemented by me.

I do know Java but I know virtually nothing about the Solr API.  If there is a more appropriate mailing list to ask such a question, I apologize and ask that someone would point it out, please.

Thanks!


Johannes

-- 
Dr. Johannes Ruscheinski
Universitätsbibliothek Tübingen - IT-Abteilung -
Wilhelmstr. 32, 72074 Tübingen

Tel: +49 7071 29-72820
FAX: +49 7071 29-5069

 The Sophisticate:  "The world isn't black and white.  No one does pure good or pure bad. It's all gray.  Therefore, no one is better than anyone else."
    The Zetet:  "Knowing only gray, you conclude that all grays are the same shade.  You mock the simplicity of the two-color view, yet you replace it with a one-color view..."
      —Marc Stiegler, David's Sling

Reply | Threaded
Open this post in threaded view
|

Re: Solr Java-API Question

david.w.smiley@gmail.com
In reply to this post by Johannes Ruscheinski
I hope this helps:

No, LongPointField only does single points, not point-ranges.  Some day we need a dedicated LongRangeField and similar for other primitives.

~ David


On Wed, May 20, 2020 at 3:25 AM Ruscheinski, Johannes <[hidden email]> wrote:

Hi David,


thanks for the advice.  I hope I get the necessary resolution this way.  As I understand the recommendation it is to use seconds.  I think we need 9 decimal places.  So that's 10^9 s which is not quite 32 years.  Also how do I issue my intersection queries at the Java API level once I have populated the DateRange fields?


Johannes

-- 
Dr. Johannes Ruscheinski
Universitätsbibliothek Tübingen - IT-Abteilung -
Wilhelmstr. 32, 72074 Tübingen

Tel: +49 7071 29-72820
FAX: +49 7071 29-5069

 The Sophisticate:  "The world isn't black and white.  No one does pure good or pure bad. It's all gray.  Therefore, no one is better than anyone else."
    The Zetet:  "Knowing only gray, you conclude that all grays are the same shade.  You mock the simplicity of the two-color view, yet you replace it with a one-color view..."
      —Marc Stiegler, David's Sling


From: David Smiley <[hidden email]>
Sent: 19 May 2020 16:17:38
To: Solr/Lucene Dev
Subject: Re: Solr Java-API Question
 
Hi,

The first two paragraphs essentially cover it: use DateRangeField (even for integers).

~ David


On Tue, May 19, 2020 at 9:59 AM Ruscheinski, Johannes <[hidden email]> wrote:

Hi,


I have the following problem:


My "documents" have a field that contains one or more 2D intervals (mostly it is a single interval).  I have queries that consist of one or more intervals (also most of the queries consist of a single interval).  I need to generate a list of document IDs that have at least a partial overlap with one of the intervals contained in the query.  The ranking needs to be implemented by me.

I do know Java but I know virtually nothing about the Solr API.  If there is a more appropriate mailing list to ask such a question, I apologize and ask that someone would point it out, please.

Thanks!


Johannes

-- 
Dr. Johannes Ruscheinski
Universitätsbibliothek Tübingen - IT-Abteilung -
Wilhelmstr. 32, 72074 Tübingen

Tel: +49 7071 29-72820
FAX: +49 7071 29-5069

 The Sophisticate:  "The world isn't black and white.  No one does pure good or pure bad. It's all gray.  Therefore, no one is better than anyone else."
    The Zetet:  "Knowing only gray, you conclude that all grays are the same shade.  You mock the simplicity of the two-color view, yet you replace it with a one-color view..."
      —Marc Stiegler, David's Sling

Reply | Threaded
Open this post in threaded view
|

Re: Solr Java-API Question

Johannes Ruscheinski

Hi David,


I just came back after a few days off and wanted to thank you for your help!  I'll be following your suggestion and will be using DateRangeField.


Johannes
-- 
Dr. Johannes Ruscheinski
Universitätsbibliothek Tübingen - IT-Abteilung -
Wilhelmstr. 32, 72074 Tübingen

Tel: +49 7071 29-72820
FAX: +49 7071 29-5069

 The Sophisticate:  "The world isn't black and white.  No one does pure good or pure bad. It's all gray.  Therefore, no one is better than anyone else."
    The Zetet:  "Knowing only gray, you conclude that all grays are the same shade.  You mock the simplicity of the two-color view, yet you replace it with a one-color view..."
      —Marc Stiegler, David's Sling


From: David Smiley <[hidden email]>
Sent: 20 May 2020 16:20:15
To: Solr/Lucene Dev
Subject: Re: Solr Java-API Question
 
I hope this helps:

No, LongPointField only does single points, not point-ranges.  Some day we need a dedicated LongRangeField and similar for other primitives.

~ David


On Wed, May 20, 2020 at 3:25 AM Ruscheinski, Johannes <[hidden email]> wrote:

Hi David,


thanks for the advice.  I hope I get the necessary resolution this way.  As I understand the recommendation it is to use seconds.  I think we need 9 decimal places.  So that's 10^9 s which is not quite 32 years.  Also how do I issue my intersection queries at the Java API level once I have populated the DateRange fields?


Johannes

-- 
Dr. Johannes Ruscheinski
Universitätsbibliothek Tübingen - IT-Abteilung -
Wilhelmstr. 32, 72074 Tübingen

Tel: +49 7071 29-72820
FAX: +49 7071 29-5069

 The Sophisticate:  "The world isn't black and white.  No one does pure good or pure bad. It's all gray.  Therefore, no one is better than anyone else."
    The Zetet:  "Knowing only gray, you conclude that all grays are the same shade.  You mock the simplicity of the two-color view, yet you replace it with a one-color view..."
      —Marc Stiegler, David's Sling


From: David Smiley <[hidden email]>
Sent: 19 May 2020 16:17:38
To: Solr/Lucene Dev
Subject: Re: Solr Java-API Question
 
Hi,

The first two paragraphs essentially cover it: use DateRangeField (even for integers).

~ David


On Tue, May 19, 2020 at 9:59 AM Ruscheinski, Johannes <[hidden email]> wrote:

Hi,


I have the following problem:


My "documents" have a field that contains one or more 2D intervals (mostly it is a single interval).  I have queries that consist of one or more intervals (also most of the queries consist of a single interval).  I need to generate a list of document IDs that have at least a partial overlap with one of the intervals contained in the query.  The ranking needs to be implemented by me.

I do know Java but I know virtually nothing about the Solr API.  If there is a more appropriate mailing list to ask such a question, I apologize and ask that someone would point it out, please.

Thanks!


Johannes

-- 
Dr. Johannes Ruscheinski
Universitätsbibliothek Tübingen - IT-Abteilung -
Wilhelmstr. 32, 72074 Tübingen

Tel: +49 7071 29-72820
FAX: +49 7071 29-5069

 The Sophisticate:  "The world isn't black and white.  No one does pure good or pure bad. It's all gray.  Therefore, no one is better than anyone else."
    The Zetet:  "Knowing only gray, you conclude that all grays are the same shade.  You mock the simplicity of the two-color view, yet you replace it with a one-color view..."
      —Marc Stiegler, David's Sling

Reply | Threaded
Open this post in threaded view
|

Re: Solr Java-API Question

Johannes Ruscheinski

Hi David,


I am stuck again.  In particular, I don't know how to initialize my DateRangeFields in Java.  I am trying to implement a function with a signature as follows:


public static List<???> getDateRanges(final Record record, final String rangeFieldTag) {


My problem is what to use as the type parameter for List<>.  We're using SolrMARC.  It is not immediately obvious from the documentation as to how to do that.  "record" here is a MARC record that contains some field with ranges that I need to convert to a list of something that I can use to populate my DateRangeField instances.


Johannes

-- 
Dr. Johannes Ruscheinski
Universitätsbibliothek Tübingen - IT-Abteilung -
Wilhelmstr. 32, 72074 Tübingen

Tel: +49 7071 29-72820
FAX: +49 7071 29-5069

 The Sophisticate:  "The world isn't black and white.  No one does pure good or pure bad. It's all gray.  Therefore, no one is better than anyone else."
    The Zetet:  "Knowing only gray, you conclude that all grays are the same shade.  You mock the simplicity of the two-color view, yet you replace it with a one-color view..."
      —Marc Stiegler, David's Sling


From: Ruscheinski, Johannes <[hidden email]>
Sent: 26 May 2020 10:55:41
To: [hidden email]
Subject: Re: Solr Java-API Question
 

Hi David,


I just came back after a few days off and wanted to thank you for your help!  I'll be following your suggestion and will be using DateRangeField.


Johannes
-- 
Dr. Johannes Ruscheinski
Universitätsbibliothek Tübingen - IT-Abteilung -
Wilhelmstr. 32, 72074 Tübingen

Tel: +49 7071 29-72820
FAX: +49 7071 29-5069

 The Sophisticate:  "The world isn't black and white.  No one does pure good or pure bad. It's all gray.  Therefore, no one is better than anyone else."
    The Zetet:  "Knowing only gray, you conclude that all grays are the same shade.  You mock the simplicity of the two-color view, yet you replace it with a one-color view..."
      —Marc Stiegler, David's Sling


From: David Smiley <[hidden email]>
Sent: 20 May 2020 16:20:15
To: Solr/Lucene Dev
Subject: Re: Solr Java-API Question
 
I hope this helps:

No, LongPointField only does single points, not point-ranges.  Some day we need a dedicated LongRangeField and similar for other primitives.

~ David


On Wed, May 20, 2020 at 3:25 AM Ruscheinski, Johannes <[hidden email]> wrote:

Hi David,


thanks for the advice.  I hope I get the necessary resolution this way.  As I understand the recommendation it is to use seconds.  I think we need 9 decimal places.  So that's 10^9 s which is not quite 32 years.  Also how do I issue my intersection queries at the Java API level once I have populated the DateRange fields?


Johannes

-- 
Dr. Johannes Ruscheinski
Universitätsbibliothek Tübingen - IT-Abteilung -
Wilhelmstr. 32, 72074 Tübingen

Tel: +49 7071 29-72820
FAX: +49 7071 29-5069

 The Sophisticate:  "The world isn't black and white.  No one does pure good or pure bad. It's all gray.  Therefore, no one is better than anyone else."
    The Zetet:  "Knowing only gray, you conclude that all grays are the same shade.  You mock the simplicity of the two-color view, yet you replace it with a one-color view..."
      —Marc Stiegler, David's Sling


From: David Smiley <[hidden email]>
Sent: 19 May 2020 16:17:38
To: Solr/Lucene Dev
Subject: Re: Solr Java-API Question
 
Hi,

The first two paragraphs essentially cover it: use DateRangeField (even for integers).

~ David


On Tue, May 19, 2020 at 9:59 AM Ruscheinski, Johannes <[hidden email]> wrote:

Hi,


I have the following problem:


My "documents" have a field that contains one or more 2D intervals (mostly it is a single interval).  I have queries that consist of one or more intervals (also most of the queries consist of a single interval).  I need to generate a list of document IDs that have at least a partial overlap with one of the intervals contained in the query.  The ranking needs to be implemented by me.

I do know Java but I know virtually nothing about the Solr API.  If there is a more appropriate mailing list to ask such a question, I apologize and ask that someone would point it out, please.

Thanks!


Johannes

-- 
Dr. Johannes Ruscheinski
Universitätsbibliothek Tübingen - IT-Abteilung -
Wilhelmstr. 32, 72074 Tübingen

Tel: +49 7071 29-72820
FAX: +49 7071 29-5069

 The Sophisticate:  "The world isn't black and white.  No one does pure good or pure bad. It's all gray.  Therefore, no one is better than anyone else."
    The Zetet:  "Knowing only gray, you conclude that all grays are the same shade.  You mock the simplicity of the two-color view, yet you replace it with a one-color view..."
      —Marc Stiegler, David's Sling

Reply | Threaded
Open this post in threaded view
|

Re: Solr Java-API Question

david.w.smiley@gmail.com
I don't know about SolrMARC.  But with respect to input/outout to Solr of these fields, treat them as Strings encoded as described in the docs.
~ David


On Tue, May 26, 2020 at 5:56 AM Ruscheinski, Johannes <[hidden email]> wrote:

Hi David,


I am stuck again.  In particular, I don't know how to initialize my DateRangeFields in Java.  I am trying to implement a function with a signature as follows:


public static List<???> getDateRanges(final Record record, final String rangeFieldTag) {


My problem is what to use as the type parameter for List<>.  We're using SolrMARC.  It is not immediately obvious from the documentation as to how to do that.  "record" here is a MARC record that contains some field with ranges that I need to convert to a list of something that I can use to populate my DateRangeField instances.


Johannes

-- 
Dr. Johannes Ruscheinski
Universitätsbibliothek Tübingen - IT-Abteilung -
Wilhelmstr. 32, 72074 Tübingen

Tel: +49 7071 29-72820
FAX: +49 7071 29-5069

 The Sophisticate:  "The world isn't black and white.  No one does pure good or pure bad. It's all gray.  Therefore, no one is better than anyone else."
    The Zetet:  "Knowing only gray, you conclude that all grays are the same shade.  You mock the simplicity of the two-color view, yet you replace it with a one-color view..."
      —Marc Stiegler, David's Sling


From: Ruscheinski, Johannes <[hidden email]>
Sent: 26 May 2020 10:55:41
To: [hidden email]
Subject: Re: Solr Java-API Question
 

Hi David,


I just came back after a few days off and wanted to thank you for your help!  I'll be following your suggestion and will be using DateRangeField.


Johannes
-- 
Dr. Johannes Ruscheinski
Universitätsbibliothek Tübingen - IT-Abteilung -
Wilhelmstr. 32, 72074 Tübingen

Tel: +49 7071 29-72820
FAX: +49 7071 29-5069

 The Sophisticate:  "The world isn't black and white.  No one does pure good or pure bad. It's all gray.  Therefore, no one is better than anyone else."
    The Zetet:  "Knowing only gray, you conclude that all grays are the same shade.  You mock the simplicity of the two-color view, yet you replace it with a one-color view..."
      —Marc Stiegler, David's Sling


From: David Smiley <[hidden email]>
Sent: 20 May 2020 16:20:15
To: Solr/Lucene Dev
Subject: Re: Solr Java-API Question
 
I hope this helps:

No, LongPointField only does single points, not point-ranges.  Some day we need a dedicated LongRangeField and similar for other primitives.

~ David


On Wed, May 20, 2020 at 3:25 AM Ruscheinski, Johannes <[hidden email]> wrote:

Hi David,


thanks for the advice.  I hope I get the necessary resolution this way.  As I understand the recommendation it is to use seconds.  I think we need 9 decimal places.  So that's 10^9 s which is not quite 32 years.  Also how do I issue my intersection queries at the Java API level once I have populated the DateRange fields?


Johannes

-- 
Dr. Johannes Ruscheinski
Universitätsbibliothek Tübingen - IT-Abteilung -
Wilhelmstr. 32, 72074 Tübingen

Tel: +49 7071 29-72820
FAX: +49 7071 29-5069

 The Sophisticate:  "The world isn't black and white.  No one does pure good or pure bad. It's all gray.  Therefore, no one is better than anyone else."
    The Zetet:  "Knowing only gray, you conclude that all grays are the same shade.  You mock the simplicity of the two-color view, yet you replace it with a one-color view..."
      —Marc Stiegler, David's Sling


From: David Smiley <[hidden email]>
Sent: 19 May 2020 16:17:38
To: Solr/Lucene Dev
Subject: Re: Solr Java-API Question
 
Hi,

The first two paragraphs essentially cover it: use DateRangeField (even for integers).

~ David


On Tue, May 19, 2020 at 9:59 AM Ruscheinski, Johannes <[hidden email]> wrote:

Hi,


I have the following problem:


My "documents" have a field that contains one or more 2D intervals (mostly it is a single interval).  I have queries that consist of one or more intervals (also most of the queries consist of a single interval).  I need to generate a list of document IDs that have at least a partial overlap with one of the intervals contained in the query.  The ranking needs to be implemented by me.

I do know Java but I know virtually nothing about the Solr API.  If there is a more appropriate mailing list to ask such a question, I apologize and ask that someone would point it out, please.

Thanks!


Johannes

-- 
Dr. Johannes Ruscheinski
Universitätsbibliothek Tübingen - IT-Abteilung -
Wilhelmstr. 32, 72074 Tübingen

Tel: +49 7071 29-72820
FAX: +49 7071 29-5069

 The Sophisticate:  "The world isn't black and white.  No one does pure good or pure bad. It's all gray.  Therefore, no one is better than anyone else."
    The Zetet:  "Knowing only gray, you conclude that all grays are the same shade.  You mock the simplicity of the two-color view, yet you replace it with a one-color view..."
      —Marc Stiegler, David's Sling

Reply | Threaded
Open this post in threaded view
|

Re: Solr Java-API Question

Johannes Ruscheinski

Treating them as strings worked, thanks!


Johannes

-- 
Dr. Johannes Ruscheinski
Universitätsbibliothek Tübingen - IT-Abteilung -
Wilhelmstr. 32, 72074 Tübingen

Tel: +49 7071 29-72820
FAX: +49 7071 29-5069

 The Sophisticate:  "The world isn't black and white.  No one does pure good or pure bad. It's all gray.  Therefore, no one is better than anyone else."
    The Zetet:  "Knowing only gray, you conclude that all grays are the same shade.  You mock the simplicity of the two-color view, yet you replace it with a one-color view..."
      —Marc Stiegler, David's Sling


From: David Smiley <[hidden email]>
Sent: 26 May 2020 22:34:45
To: Solr/Lucene Dev
Subject: Re: Solr Java-API Question
 
I don't know about SolrMARC.  But with respect to input/outout to Solr of these fields, treat them as Strings encoded as described in the docs.
~ David


On Tue, May 26, 2020 at 5:56 AM Ruscheinski, Johannes <[hidden email]> wrote:

Hi David,


I am stuck again.  In particular, I don't know how to initialize my DateRangeFields in Java.  I am trying to implement a function with a signature as follows:


public static List<???> getDateRanges(final Record record, final String rangeFieldTag) {


My problem is what to use as the type parameter for List<>.  We're using SolrMARC.  It is not immediately obvious from the documentation as to how to do that.  "record" here is a MARC record that contains some field with ranges that I need to convert to a list of something that I can use to populate my DateRangeField instances.


Johannes

-- 
Dr. Johannes Ruscheinski
Universitätsbibliothek Tübingen - IT-Abteilung -
Wilhelmstr. 32, 72074 Tübingen

Tel: +49 7071 29-72820
FAX: +49 7071 29-5069

 The Sophisticate:  "The world isn't black and white.  No one does pure good or pure bad. It's all gray.  Therefore, no one is better than anyone else."
    The Zetet:  "Knowing only gray, you conclude that all grays are the same shade.  You mock the simplicity of the two-color view, yet you replace it with a one-color view..."
      —Marc Stiegler, David's Sling


From: Ruscheinski, Johannes <[hidden email]>
Sent: 26 May 2020 10:55:41
To: [hidden email]
Subject: Re: Solr Java-API Question
 

Hi David,


I just came back after a few days off and wanted to thank you for your help!  I'll be following your suggestion and will be using DateRangeField.


Johannes
-- 
Dr. Johannes Ruscheinski
Universitätsbibliothek Tübingen - IT-Abteilung -
Wilhelmstr. 32, 72074 Tübingen

Tel: +49 7071 29-72820
FAX: +49 7071 29-5069

 The Sophisticate:  "The world isn't black and white.  No one does pure good or pure bad. It's all gray.  Therefore, no one is better than anyone else."
    The Zetet:  "Knowing only gray, you conclude that all grays are the same shade.  You mock the simplicity of the two-color view, yet you replace it with a one-color view..."
      —Marc Stiegler, David's Sling


From: David Smiley <[hidden email]>
Sent: 20 May 2020 16:20:15
To: Solr/Lucene Dev
Subject: Re: Solr Java-API Question
 
I hope this helps:

No, LongPointField only does single points, not point-ranges.  Some day we need a dedicated LongRangeField and similar for other primitives.

~ David


On Wed, May 20, 2020 at 3:25 AM Ruscheinski, Johannes <[hidden email]> wrote:

Hi David,


thanks for the advice.  I hope I get the necessary resolution this way.  As I understand the recommendation it is to use seconds.  I think we need 9 decimal places.  So that's 10^9 s which is not quite 32 years.  Also how do I issue my intersection queries at the Java API level once I have populated the DateRange fields?


Johannes

-- 
Dr. Johannes Ruscheinski
Universitätsbibliothek Tübingen - IT-Abteilung -
Wilhelmstr. 32, 72074 Tübingen

Tel: +49 7071 29-72820
FAX: +49 7071 29-5069

 The Sophisticate:  "The world isn't black and white.  No one does pure good or pure bad. It's all gray.  Therefore, no one is better than anyone else."
    The Zetet:  "Knowing only gray, you conclude that all grays are the same shade.  You mock the simplicity of the two-color view, yet you replace it with a one-color view..."
      —Marc Stiegler, David's Sling


From: David Smiley <[hidden email]>
Sent: 19 May 2020 16:17:38
To: Solr/Lucene Dev
Subject: Re: Solr Java-API Question
 
Hi,

The first two paragraphs essentially cover it: use DateRangeField (even for integers).

~ David


On Tue, May 19, 2020 at 9:59 AM Ruscheinski, Johannes <[hidden email]> wrote:

Hi,


I have the following problem:


My "documents" have a field that contains one or more 2D intervals (mostly it is a single interval).  I have queries that consist of one or more intervals (also most of the queries consist of a single interval).  I need to generate a list of document IDs that have at least a partial overlap with one of the intervals contained in the query.  The ranking needs to be implemented by me.

I do know Java but I know virtually nothing about the Solr API.  If there is a more appropriate mailing list to ask such a question, I apologize and ask that someone would point it out, please.

Thanks!


Johannes

-- 
Dr. Johannes Ruscheinski
Universitätsbibliothek Tübingen - IT-Abteilung -
Wilhelmstr. 32, 72074 Tübingen

Tel: +49 7071 29-72820
FAX: +49 7071 29-5069

 The Sophisticate:  "The world isn't black and white.  No one does pure good or pure bad. It's all gray.  Therefore, no one is better than anyone else."
    The Zetet:  "Knowing only gray, you conclude that all grays are the same shade.  You mock the simplicity of the two-color view, yet you replace it with a one-color view..."
      —Marc Stiegler, David's Sling