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