There's that or you can just change the user entered "my_author" field into
"my_author_customattribute" in code after the user has entered it and add a
*_customattribute to your schema.

you'd have to add the postfix in code also at querytime and off you go.

Constantijn

On Wed, Aug 19, 2009 at 11:52 PM, Erik Hatcher <erik.hatc...@gmail.com>wrote:

> However, you can have a dynamic "*" field mapping that catches all field
> names that aren't already defined - though all of the fields will be the
> same field type.
>
>        Erik
>
>
>
>
> On Aug 19, 2009, at 5:48 PM, Marco Westermann wrote:
>
>  Hi, thanks for your answers, I think I have to go more in deatail.
>>
>> we are talking about a shop-application which have products I want to
>> search for. This products normally have the standard attributes like sku, a
>> name, a price and so on. But the user can add attributes to the product. So
>> for example if he sells books, he could add the author as attribute. Lets
>> say he name this field my_author (but he is free to name it as he wants) and
>> he tells this field over  the configuration, that it is searchable. So I
>> need a field in solr for the author. Cause I cant restrict the user to
>> prefix every field with something like my_ dynamic fields doesn't work, do
>> they?
>>
>> best,
>> Marco
>>
>> Constantijn Visinescu schrieb:
>>
>>> huh? I think I lost you :)
>>> You want to use a multivalued field to list what dynamic fields you have
>>> in
>>> your document?
>>>
>>> Also if you program your application correctly you should be able to
>>> restrict your users from doing anything you please (or don't please in
>>> this
>>> case).
>>>
>>>
>>> On Tue, Aug 18, 2009 at 11:38 PM, Marco Westermann <m...@intersales.de>
>>> wrote:
>>>
>>>
>>>  hi,
>>>>
>>>> thanks for the advise but the problem with dynamic fields is, that i
>>>> cannot
>>>> restrict how the user calls the field in the application. So there isn't
>>>> a
>>>> pattern I can use. But I thought about using mulitvalued fields for the
>>>> dynamically added fields. Good Idea?
>>>>
>>>> thanks,
>>>> Marco
>>>>
>>>> Constantijn Visinescu schrieb:
>>>>
>>>>
>>>>  use a dynamic field ?
>>>>>
>>>>> On Tue, Aug 18, 2009 at 5:09 PM, Marco Westermann <m...@intersales.de>
>>>>> wrote:
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>  Hi there,
>>>>>>
>>>>>> is there a possibility to change the solr-schema over php dynamically.
>>>>>> The
>>>>>> web-application I want to index at the moment has the feature to add
>>>>>> fields
>>>>>> to entitys and you can tell this fields that they are searchable. To
>>>>>> realize
>>>>>> this with solr the schema has to change when a searchable field is
>>>>>> added
>>>>>> or
>>>>>> removed.
>>>>>>
>>>>>> Any suggestions,
>>>>>>
>>>>>> Thanks a lot,
>>>>>>
>>>>>> Marco Westermann
>>>>>>
>>>>>>

Reply via email to