You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Antonio Zippo <re...@yahoo.it> on 2009/12/10 17:46:43 UTC
Custom Field sample?
Hi all,
could you help me to create a custom field?
I need to create a field structured like a Map
is it possible? how to define if the search string is on key or value (or both)?
A way could be to create a char separated multivalued string field... but it isn't the best way..... and with facets is the worst way
could you give me a custom field sample?
Thanks in advance,
Revenge
Re: Custom Field sample?
Posted by Lance Norskog <go...@gmail.com>.
If 'Argument#' is unique, you can just use as a wildcard field name:
Argument1_s:positive is a string field.
If you want to find out which Argument fields a document has, you have
to fetch all fields for a document.
On Fri, Dec 11, 2009 at 3:05 AM, Antonio Zippo <re...@yahoo.it> wrote:
> I need to add theese "features" to each document
>
> Document1
> ---------------
> Argument1, positive
> Argument2, positive
> Argument3, neutral
> Argument4, positive
> Argument5, negative
> Argument6, negative
>
> Document2
> ---------------
> Argument1, negative
> Argument2, positive
> Argument3, negative
> Argument6, negative
> Argument7, neutral
>
> where the argument name is dynamic
> using a relational database I could use a master detail structure, but in solr?
> I thought about a Map or Pair field
>
>
>
>
>
>
>
> ________________________________
> Da: Grant Ingersoll <gs...@apache.org>
> A: solr-user@lucene.apache.org
> Inviato: Gio 10 dicembre 2009, 19:47:55
> Oggetto: Re: Custom Field sample?
>
> Can you perhaps give a little more info on what problem you are trying to solve? FWIW, there are a lot of examples of custom FieldTypes in the Solr code.
>
>
> On Dec 10, 2009, at 11:46 AM, Antonio Zippo wrote:
>
>> Hi all,
>>
>> could you help me to create a custom field?
>>
>> I need to create a field structured like a Map
>> is it possible? how to define if the search string is on key or value (or both)?
>>
>> A way could be to create a char separated multivalued string field... but it isn't the best way..... and with facets is the worst way
>>
>> could you give me a custom field sample?
>>
>>
>> Thanks in advance,
>> Revenge
>>
>>
>
> --------------------------
> Grant Ingersoll
> http://www.lucidimagination.com/
>
> Search the Lucene ecosystem (Lucene/Solr/Nutch/Mahout/Tika/Droids) using Solr/Lucene:
> http://www.lucidimagination.com/search
>
>
>
--
Lance Norskog
goksron@gmail.com
Re: Custom Field sample?
Posted by Noble Paul നോബിള് नोब्ळ् <no...@corp.aol.com>.
how exactly do you wish to query these documents?
On Fri, Dec 11, 2009 at 4:35 PM, Antonio Zippo <re...@yahoo.it> wrote:
> I need to add theese "features" to each document
>
> Document1
> ---------------
> Argument1, positive
> Argument2, positive
> Argument3, neutral
> Argument4, positive
> Argument5, negative
> Argument6, negative
>
> Document2
> ---------------
> Argument1, negative
> Argument2, positive
> Argument3, negative
> Argument6, negative
> Argument7, neutral
>
> where the argument name is dynamic
> using a relational database I could use a master detail structure, but in solr?
> I thought about a Map or Pair field
>
>
>
>
>
>
>
> ________________________________
> Da: Grant Ingersoll <gs...@apache.org>
> A: solr-user@lucene.apache.org
> Inviato: Gio 10 dicembre 2009, 19:47:55
> Oggetto: Re: Custom Field sample?
>
> Can you perhaps give a little more info on what problem you are trying to solve? FWIW, there are a lot of examples of custom FieldTypes in the Solr code.
>
>
> On Dec 10, 2009, at 11:46 AM, Antonio Zippo wrote:
>
>> Hi all,
>>
>> could you help me to create a custom field?
>>
>> I need to create a field structured like a Map
>> is it possible? how to define if the search string is on key or value (or both)?
>>
>> A way could be to create a char separated multivalued string field... but it isn't the best way..... and with facets is the worst way
>>
>> could you give me a custom field sample?
>>
>>
>> Thanks in advance,
>> Revenge
>>
>>
>
> --------------------------
> Grant Ingersoll
> http://www.lucidimagination.com/
>
> Search the Lucene ecosystem (Lucene/Solr/Nutch/Mahout/Tika/Droids) using Solr/Lucene:
> http://www.lucidimagination.com/search
>
>
>
--
-----------------------------------------------------
Noble Paul | Systems Architect| AOL | http://aol.com
Re: Custom Field sample?
Posted by Antonio Zippo <re...@yahoo.it>.
I need to add theese "features" to each document
Document1
---------------
Argument1, positive
Argument2, positive
Argument3, neutral
Argument4, positive
Argument5, negative
Argument6, negative
Document2
---------------
Argument1, negative
Argument2, positive
Argument3, negative
Argument6, negative
Argument7, neutral
where the argument name is dynamic
using a relational database I could use a master detail structure, but in solr?
I thought about a Map or Pair field
________________________________
Da: Grant Ingersoll <gs...@apache.org>
A: solr-user@lucene.apache.org
Inviato: Gio 10 dicembre 2009, 19:47:55
Oggetto: Re: Custom Field sample?
Can you perhaps give a little more info on what problem you are trying to solve? FWIW, there are a lot of examples of custom FieldTypes in the Solr code.
On Dec 10, 2009, at 11:46 AM, Antonio Zippo wrote:
> Hi all,
>
> could you help me to create a custom field?
>
> I need to create a field structured like a Map
> is it possible? how to define if the search string is on key or value (or both)?
>
> A way could be to create a char separated multivalued string field... but it isn't the best way..... and with facets is the worst way
>
> could you give me a custom field sample?
>
>
> Thanks in advance,
> Revenge
>
>
--------------------------
Grant Ingersoll
http://www.lucidimagination.com/
Search the Lucene ecosystem (Lucene/Solr/Nutch/Mahout/Tika/Droids) using Solr/Lucene:
http://www.lucidimagination.com/search
Re: Custom Field sample?
Posted by Grant Ingersoll <gs...@apache.org>.
Can you perhaps give a little more info on what problem you are trying to solve? FWIW, there are a lot of examples of custom FieldTypes in the Solr code.
On Dec 10, 2009, at 11:46 AM, Antonio Zippo wrote:
> Hi all,
>
> could you help me to create a custom field?
>
> I need to create a field structured like a Map
> is it possible? how to define if the search string is on key or value (or both)?
>
> A way could be to create a char separated multivalued string field... but it isn't the best way..... and with facets is the worst way
>
> could you give me a custom field sample?
>
>
> Thanks in advance,
> Revenge
>
>
--------------------------
Grant Ingersoll
http://www.lucidimagination.com/
Search the Lucene ecosystem (Lucene/Solr/Nutch/Mahout/Tika/Droids) using Solr/Lucene:
http://www.lucidimagination.com/search