Multiple values within institutional fields

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Multiple values within institutional fields

Gonzalo Faramiñan
Simple question:

While importing MARC records I want to load multiple string values to Solr "collection" field. I guess it should be quite simple, but cannot figure it out.
I've tried comma separated values, key as an array (collection[]), duplicated declaration, etc, but none of them are working as expected

Institutional fields are configured as multiValue at my Solr schema.xml, as default:

   <!-- Institutional Fields -->
   <field name="institution" type="string" indexed="true" stored="true" multiValued="true"/>
   <field name="collection" type="string" indexed="true" stored="true" multiValued="true"/>
   <field name="building" type="string" indexed="true" stored="true" multiValued="true"/>

Thanks in advance,

Gonzalo





------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Vufind-tech mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/vufind-tech
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Multiple values within institutional fields

Demian Katz


I'm actually not sure if SolrMarc supports a mechanism for specifying multiple values directly through the properties file, though this would obviously be useful in cases like yours -- I'm copying solrmarc-tech in case somebody there can comment.


In the meantime, one relatively straightforward solution would be to write a BeanShell script that simply returns a set containing the values you need. This certainly feels like more work than should be necessary, but at the same time, it shouldn't be very hard. If you haven't worked with this kind of scripting before, let me know and I can share more details.


- Demian



From: Gonzalo Faramiñan <[hidden email]>
Sent: Friday, December 2, 2016 10:14 AM
To: [hidden email]
Subject: [VuFind-Tech] Multiple values within institutional fields
 
Simple question:

While importing MARC records I want to load multiple string values to Solr "collection" field. I guess it should be quite simple, but cannot figure it out.
I've tried comma separated values, key as an array (collection[]), duplicated declaration, etc, but none of them are working as expected

Institutional fields are configured as multiValue at my Solr schema.xml, as default:

   <!-- Institutional Fields -->
   <field name="institution" type="string" indexed="true" stored="true" multiValued="true"/>
   <field name="collection" type="string" indexed="true" stored="true" multiValued="true"/>
   <field name="building" type="string" indexed="true" stored="true" multiValued="true"/>

Thanks in advance,

Gonzalo





------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Vufind-tech mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/vufind-tech
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Multiple values within institutional fields

Tod Olson
How are the collection values represented in the MARC records? If they are just all in repeating fields, it should just work. Data like:

999 ‡a Collection1
999 ‡a Collection2

and a property like

collection = 999a

should mean that every 999‡a goes into the Solr collection field. Perhaps I'm missing something.

-Tod

On Dec 2, 2016, at 9:52 AM, Demian Katz <[hidden email]> wrote:


I'm actually not sure if SolrMarc supports a mechanism for specifying multiple values directly through the properties file, though this would obviously be useful in cases like yours -- I'm copying solrmarc-tech in case somebody there can comment.

In the meantime, one relatively straightforward solution would be to write a BeanShell script that simply returns a set containing the values you need. This certainly feels like more work than should be necessary, but at the same time, it shouldn't be very hard. If you haven't worked with this kind of scripting before, let me know and I can share more details.

- Demian


From: Gonzalo Faramiñan <[hidden email]>
Sent: Friday, December 2, 2016 10:14 AM
To: [hidden email]
Subject: [VuFind-Tech] Multiple values within institutional fields
 
Simple question:

While importing MARC records I want to load multiple string values to Solr "collection" field. I guess it should be quite simple, but cannot figure it out. 
I've tried comma separated values, key as an array (collection[]), duplicated declaration, etc, but none of them are working as expected

Institutional fields are configured as multiValue at my Solr schema.xml, as default:

   <!-- Institutional Fields -->
   <field name="institution" type="string" indexed="true" stored="true" multiValued="true"/>
   <field name="collection" type="string" indexed="true" stored="true" multiValued="true"/>
   <field name="building" type="string" indexed="true" stored="true" multiValued="true"/>

Thanks in advance, 

Gonzalo




------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot_______________________________________________
Vufind-tech mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/vufind-tech


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Vufind-tech mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/vufind-tech
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [solrmarc-tech] Re: Multiple values within institutional fields

Robert Haschart
In reply to this post by Demian Katz
Gonzalo,

With the new version of SolrMarc,  accomplishing that is easy.  
 
https://github.com/solrmarc/solrmarc/wiki/Index-Specification-File#constant-field-specification

format_facet = "Online"|"EBook"|"Government Document"
You could also use the syntax that allows you to extend a previously defined index specification

format_facet = "Online"
format_facet += "EBook"
format_facet += "Government Document"



-Bob Haschart


On 12/2/2016 10:52 AM, Demian Katz wrote:


I'm actually not sure if SolrMarc supports a mechanism for specifying multiple values directly through the properties file, though this would obviously be useful in cases like yours -- I'm copying solrmarc-tech in case somebody there can comment.


In the meantime, one relatively straightforward solution would be to write a BeanShell script that simply returns a set containing the values you need. This certainly feels like more work than should be necessary, but at the same time, it shouldn't be very hard. If you haven't worked with this kind of scripting before, let me know and I can share more details.


- Demian



From: Gonzalo Faramiñan [hidden email]
Sent: Friday, December 2, 2016 10:14 AM
To: [hidden email]
Subject: [VuFind-Tech] Multiple values within institutional fields
 
Simple question:

While importing MARC records I want to load multiple string values to Solr "collection" field. I guess it should be quite simple, but cannot figure it out.
I've tried comma separated values, key as an array (collection[]), duplicated declaration, etc, but none of them are working as expected

Institutional fields are configured as multiValue at my Solr schema.xml, as default:

   <!-- Institutional Fields -->
   <field name="institution" type="string" indexed="true" stored="true" multiValued="true"/>
   <field name="collection" type="string" indexed="true" stored="true" multiValued="true"/>
   <field name="building" type="string" indexed="true" stored="true" multiValued="true"/>

Thanks in advance,

Gonzalo




--
You received this message because you are subscribed to the Google Groups "solrmarc-tech" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/solrmarc-tech.
For more options, visit https://groups.google.com/d/optout.


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Vufind-tech mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/vufind-tech
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [solrmarc-tech] Re: Multiple values within institutional fields

Gonzalo Faramiñan
Thank you everyone for your answers!

I finally followed Todd's suggestion (collection = marcfield), adding a local translation map.

Besides that, is good to know that it's now possible to do add multiple strings through SolrMarc. I didn't see Robert's hint on syntax since I was reading the SolrMarc documentation at Google Code, not Git.

Have a nice weekend!

2016-12-02 15:20 GMT-03:00 Robert Haschart <[hidden email]>:
Gonzalo,

With the new version of SolrMarc,  accomplishing that is easy.  
 
https://github.com/solrmarc/solrmarc/wiki/Index-Specification-File#constant-field-specification

format_facet = "Online"|"EBook"|"Government Document"
You could also use the syntax that allows you to extend a previously defined index specification

format_facet = "Online"
format_facet += "EBook"
format_facet += "Government Document"



-Bob Haschart



On 12/2/2016 10:52 AM, Demian Katz wrote:


I'm actually not sure if SolrMarc supports a mechanism for specifying multiple values directly through the properties file, though this would obviously be useful in cases like yours -- I'm copying solrmarc-tech in case somebody there can comment.


In the meantime, one relatively straightforward solution would be to write a BeanShell script that simply returns a set containing the values you need. This certainly feels like more work than should be necessary, but at the same time, it shouldn't be very hard. If you haven't worked with this kind of scripting before, let me know and I can share more details.


- Demian



From: Gonzalo Faramiñan [hidden email]
Sent: Friday, December 2, 2016 10:14 AM
To: [hidden email]
Subject: [VuFind-Tech] Multiple values within institutional fields
 
Simple question:

While importing MARC records I want to load multiple string values to Solr "collection" field. I guess it should be quite simple, but cannot figure it out.
I've tried comma separated values, key as an array (collection[]), duplicated declaration, etc, but none of them are working as expected

Institutional fields are configured as multiValue at my Solr schema.xml, as default:

   <!-- Institutional Fields -->
   <field name="institution" type="string" indexed="true" stored="true" multiValued="true"/>
   <field name="collection" type="string" indexed="true" stored="true" multiValued="true"/>
   <field name="building" type="string" indexed="true" stored="true" multiValued="true"/>

Thanks in advance,

Gonzalo




--
You received this message because you are subscribed to the Google Groups "solrmarc-tech" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/solrmarc-tech.
For more options, visit https://groups.google.com/d/optout.



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Vufind-tech mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/vufind-tech
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [solrmarc-tech] Re: Multiple values within institutional fields

Robert Haschart
A similar syntax was supported in the previous version of SolrMarc, where you could specify:

doc_type_facet = "online|external|openaccess|getty|novirgoclassic"

and the Solr index would have 5 fields

doc_type_facet = online
doc_type_facet = external
doc_type_facet = openaccess
doc_type_facet = getty
doc_type_facet = novirgoclassic

This syntax is not (currently) supported in the new version of SolrMarc, I'm undecided on whether to add that functionality back into this new version.
If anyone other than me used that, I'll add support for it.  

BTW  what specific index specification/local translation map are you using based on Todd's suggestion?

-Bob Haschart

On 12/2/2016 1:55 PM, Gonzalo Faramiñan wrote:
Thank you everyone for your answers!

I finally followed Todd's suggestion (collection = marcfield), adding a local translation map.

Besides that, is good to know that it's now possible to do add multiple strings through SolrMarc. I didn't see Robert's hint on syntax since I was reading the SolrMarc documentation at Google Code, not Git.

Have a nice weekend!

2016-12-02 15:20 GMT-03:00 Robert Haschart <[hidden email]>:
Gonzalo,

With the new version of SolrMarc,  accomplishing that is easy.  
 
https://github.com/solrmarc/solrmarc/wiki/Index-Specification-File#constant-field-specification

format_facet = "Online"|"EBook"|"Government Document"
You could also use the syntax that allows you to extend a previously defined index specification

format_facet = "Online"
format_facet += "EBook"
format_facet += "Government Document"



-Bob Haschart



On 12/2/2016 10:52 AM, Demian Katz wrote:


I'm actually not sure if SolrMarc supports a mechanism for specifying multiple values directly through the properties file, though this would obviously be useful in cases like yours -- I'm copying solrmarc-tech in case somebody there can comment.


In the meantime, one relatively straightforward solution would be to write a BeanShell script that simply returns a set containing the values you need. This certainly feels like more work than should be necessary, but at the same time, it shouldn't be very hard. If you haven't worked with this kind of scripting before, let me know and I can share more details.


- Demian



From: Gonzalo Faramiñan [hidden email]
Sent: Friday, December 2, 2016 10:14 AM
To: [hidden email]
Subject: [VuFind-Tech] Multiple values within institutional fields
 
Simple question:

While importing MARC records I want to load multiple string values to Solr "collection" field. I guess it should be quite simple, but cannot figure it out.
I've tried comma separated values, key as an array (collection[]), duplicated declaration, etc, but none of them are working as expected

Institutional fields are configured as multiValue at my Solr schema.xml, as default:

   <!-- Institutional Fields -->
   <field name="institution" type="string" indexed="true" stored="true" multiValued="true"/>
   <field name="collection" type="string" indexed="true" stored="true" multiValued="true"/>
   <field name="building" type="string" indexed="true" stored="true" multiValued="true"/>

Thanks in advance,

Gonzalo




--
You received this message because you are subscribed to the Google Groups "solrmarc-tech" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/solrmarc-tech.
For more options, visit https://groups.google.com/d/optout.




------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Vufind-tech mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/vufind-tech
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [solrmarc-tech] Re: Multiple values within institutional fields

Demian Katz

For what it’s worth, I like the += syntax a lot more than the pipe-separation syntax, which could easily cause confusion and problems if somebody actually wants to index a pipe character and is not expecting this behavior. I’m not aware of anyone who is using this currently (though please speak up and correct me if you are!).

 

- Demian

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Robert Haschart
Sent: Friday, December 02, 2016 5:17 PM
To: Gonzalo Faramiñan
Cc: [hidden email]; [hidden email]
Subject: Re: [solrmarc-tech] Re: [VuFind-Tech] Multiple values within institutional fields

 

A similar syntax was supported in the previous version of SolrMarc, where you could specify:

doc_type_facet = "online|external|openaccess|getty|novirgoclassic"

and the Solr index would have 5 fields

doc_type_facet = online
doc_type_facet = external
doc_type_facet = openaccess
doc_type_facet = getty
doc_type_facet = novirgoclassic

This syntax is not (currently) supported in the new version of SolrMarc, I'm undecided on whether to add that functionality back into this new version.
If anyone other than me used that, I'll add support for it.  


BTW  what specific index specification/local translation map are you using based on Todd's suggestion?

-Bob Haschart

On 12/2/2016 1:55 PM, Gonzalo Faramiñan wrote:

Thank you everyone for your answers!

I finally followed Todd's suggestion (collection = marcfield), adding a local translation map.

Besides that, is good to know that it's now possible to do add multiple strings through SolrMarc. I didn't see Robert's hint on syntax since I was reading the SolrMarc documentation at Google Code, not Git.

Have a nice weekend!

 

2016-12-02 15:20 GMT-03:00 Robert Haschart <[hidden email]>:

Gonzalo,

With the new version of SolrMarc,  accomplishing that is easy.  
 
https://github.com/solrmarc/solrmarc/wiki/Index-Specification-File#constant-field-specification

format_facet = "Online"|"EBook"|"Government Document"

You could also use the syntax that allows you to extend a previously defined index specification

format_facet = "Online"
format_facet += "EBook"
format_facet += "Government Document"



-Bob Haschart



On 12/2/2016 10:52 AM, Demian Katz wrote:

 

I'm actually not sure if SolrMarc supports a mechanism for specifying multiple values directly through the properties file, though this would obviously be useful in cases like yours -- I'm copying solrmarc-tech in case somebody there can comment.

 

In the meantime, one relatively straightforward solution would be to write a BeanShell script that simply returns a set containing the values you need. This certainly feels like more work than should be necessary, but at the same time, it shouldn't be very hard. If you haven't worked with this kind of scripting before, let me know and I can share more details.

 

- Demian

 


From: Gonzalo Faramiñan [hidden email]
Sent: Friday, December 2, 2016 10:14 AM
To: [hidden email]
Subject: [VuFind-Tech] Multiple values within institutional fields

 

Simple question:

While importing MARC records I want to load multiple string values to Solr "collection" field. I guess it should be quite simple, but cannot figure it out.

I've tried comma separated values, key as an array (collection[]), duplicated declaration, etc, but none of them are working as expected

 

Institutional fields are configured as multiValue at my Solr schema.xml, as default:

   <!-- Institutional Fields -->
   <field name="institution" type="string" indexed="true" stored="true" multiValued="true"/>
   <field name="collection" type="string" indexed="true" stored="true" multiValued="true"/>
   <field name="building" type="string" indexed="true" stored="true" multiValued="true"/>

Thanks in advance,

Gonzalo



 

--
You received this message because you are subscribed to the Google Groups "solrmarc-tech" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/solrmarc-tech.
For more options, visit https://groups.google.com/d/optout.

 

 

 

--
You received this message because you are subscribed to the Google Groups "solrmarc-tech" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/solrmarc-tech.
For more options, visit https://groups.google.com/d/optout.


------------------------------------------------------------------------------

_______________________________________________
Vufind-tech mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/vufind-tech
Loading...