Custom Field sample?

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

Custom Field sample?

revenge-2
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


Reply | Threaded
Open this post in threaded view
|

Re: Custom Field sample?

Grant Ingersoll-2
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

Reply | Threaded
Open this post in threaded view
|

Re: Custom Field sample?

revenge-2
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 <[hidden email]>
A: [hidden email]
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


Reply | Threaded
Open this post in threaded view
|

Re: Custom Field sample?

Lance Norskog-2
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 <[hidden email]> 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 <[hidden email]>
> A: [hidden email]
> 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
[hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: Custom Field sample?

Noble Paul നോബിള്‍  नोब्ळ्-2
In reply to this post by revenge-2
how exactly do you wish to query these documents?

On Fri, Dec 11, 2009 at 4:35 PM, Antonio Zippo <[hidden email]> 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 <[hidden email]>
> A: [hidden email]
> 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