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 Udaya <uk...@gmail.com> on 2009/04/09 03:50:48 UTC
Its urgent! plz help in schema.xml- appending one field to another
Hi,
Need your help,
I would like to know how we could append or add one field value to another
field in Scheme.xml
My scheme is as follows (only the field part is given):
Scheme.xml
<fields>
<field name="topics_id" type="integer" indexed="true" stored="true"
required="true" />
<field name="topics_subject" type="text" indexed="true" stored="true"
required="true"/>
<field name="post_text" type="text" indexed="true" stored="true"
multiValued="true"/>
<field name="url" type="string" stored="true"
default="http://comp.com/portals/ForumWindow?action=1&v=t&p="topics_id"#"topics_id""
/>
<field name="all_text" type="text" indexed="true" stored="true"
multiValued="true"/>
Here for the field with name "topics_id" we get id from a table. I what his
topics_id value to be appended into the default value attribute of the field
with name "url".
For eg:
Suppose if we get topics_id value as 512 during a search then the value of
the url should be appended as
http://comp.com/portals/JBossForumWindow?action=1&v=t&p=512#512
Is this possible, plz give me some suggestions.
Thanks,
Udaya
--
View this message in context: http://www.nabble.com/Its-urgent%21-plz-help-in-schema.xml--appending-one-field-to-another-tp22963108p22963108.html
Sent from the Solr - User mailing list archive at Nabble.com.
Re: Its urgent! plz help in schema.xml- appending one field to
another
Posted by Udaya <uk...@gmail.com>.
Erik Hatcher wrote:
>
>
> On Apr 8, 2009, at 9:50 PM, Udaya wrote:
>
>>
>> Hi,
>> Need your help,
>> I would like to know how we could append or add one field value to
>> another
>> field in Scheme.xml
>> My scheme is as follows (only the field part is given):
>> Scheme.xml
>> <fields>
>> <field name="topics_id" type="integer" indexed="true" stored="true"
>> required="true" />
>> <field name="topics_subject" type="text" indexed="true"
>> stored="true"
>> required="true"/>
>> <field name="post_text" type="text" indexed="true" stored="true"
>> multiValued="true"/>
>>
>> <field name="url" type="string" stored="true"
>> default="http://comp.com/portals/ForumWindow?
>> action=1&v=t&p="topics_id"#"topics_id""
>> />
>> <field name="all_text" type="text" indexed="true" stored="true"
>> multiValued="true"/>
>>
>> Here for the field with name "topics_id" we get id from a table. I
>> what his
>> topics_id value to be appended into the default value attribute of
>> the field
>> with name "url".
>>
>> For eg:
>> Suppose if we get topics_id value as 512 during a search then the
>> value of
>> the url should be appended as
>> http://comp.com/portals/JBossForumWindow?action=1&v=t&p=512#512
>>
>> Is this possible, plz give me some suggestions.
>
> If you're using DIH to index your table, you could aggregate using the
> template transformer during indexing.
>
> If you're indexing a different way, why not let the searching client
> (UI) do the aggregation of an id into a URL?
>
> Erik
>
>
>
Hi Erik thanks for your suggestion :-)... i do have appended the id into the
url by writing code in solrj and java...
thanks
Udaya
--
View this message in context: http://www.nabble.com/Its-urgent%21-plz-help-in-schema.xml--appending-one-field-to-another-tp22963108p23001380.html
Sent from the Solr - User mailing list archive at Nabble.com.
Re: Its urgent! plz help in schema.xml- appending one field to another
Posted by Erik Hatcher <er...@ehatchersolutions.com>.
On Apr 8, 2009, at 9:50 PM, Udaya wrote:
>
> Hi,
> Need your help,
> I would like to know how we could append or add one field value to
> another
> field in Scheme.xml
> My scheme is as follows (only the field part is given):
> Scheme.xml
> <fields>
> <field name="topics_id" type="integer" indexed="true" stored="true"
> required="true" />
> <field name="topics_subject" type="text" indexed="true"
> stored="true"
> required="true"/>
> <field name="post_text" type="text" indexed="true" stored="true"
> multiValued="true"/>
>
> <field name="url" type="string" stored="true"
> default="http://comp.com/portals/ForumWindow?
> action=1&v=t&p="topics_id"#"topics_id""
> />
> <field name="all_text" type="text" indexed="true" stored="true"
> multiValued="true"/>
>
> Here for the field with name "topics_id" we get id from a table. I
> what his
> topics_id value to be appended into the default value attribute of
> the field
> with name "url".
>
> For eg:
> Suppose if we get topics_id value as 512 during a search then the
> value of
> the url should be appended as
> http://comp.com/portals/JBossForumWindow?action=1&v=t&p=512#512
>
> Is this possible, plz give me some suggestions.
If you're using DIH to index your table, you could aggregate using the
template transformer during indexing.
If you're indexing a different way, why not let the searching client
(UI) do the aggregation of an id into a URL?
Erik
Re: Its urgent! plz help in schema.xml- appending one field to another
Posted by Koji Sekiguchi <ko...@r.email.ne.jp>.
Udaya wrote:
> Hi,
> Need your help,
> I would like to know how we could append or add one field value to another
> field in Scheme.xml
> My scheme is as follows (only the field part is given):
> Scheme.xml
> <fields>
> <field name="topics_id" type="integer" indexed="true" stored="true"
> required="true" />
> <field name="topics_subject" type="text" indexed="true" stored="true"
> required="true"/>
> <field name="post_text" type="text" indexed="true" stored="true"
> multiValued="true"/>
>
> <field name="url" type="string" stored="true"
> default="http://comp.com/portals/ForumWindow?action=1&v=t&p="topics_id"#"topics_id""
> />
> <field name="all_text" type="text" indexed="true" stored="true"
> multiValued="true"/>
>
> Here for the field with name "topics_id" we get id from a table. I what his
> topics_id value to be appended into the default value attribute of the field
> with name "url".
>
> For eg:
> Suppose if we get topics_id value as 512 during a search then the value of
> the url should be appended as
> http://comp.com/portals/JBossForumWindow?action=1&v=t&p=512#512
>
> Is this possible, plz give me some suggestions.
> Thanks,
> Udaya
>
I don't think it is possible OOTB, but you can implement your update
processor:
http://wiki.apache.org/solr/UpdateRequestProcessor
Koji