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 Chamnap Chhorn <ch...@gmail.com> on 2012/03/11 04:43:08 UTC
More explanation on row in DIH
Hi all,
Anyone please help explain me about a row in DIH.
Let's say, a listing can have multiple keyphrase_assets. A keyphrase_asset
is a comma-seperated value ("hotel,bank,..."). I need to index and split by
comma into a multi-valued keyphrase field.
function fKeyphrasePosition(row) {
}
<entity name="keyphrase_assets"
transformer="script:fKeyphrasePosition"
query="SELECT keyphrase, position_range FROM keyphrase_assets
WHERE listing_uuid='${listing.uuid}' AND status='active'" />
Therefore, my fKeyphrasePosition function will executed every row of
keyphrase_asset or just execute only one time?
Because keyphrase is a dynamic field in schema.xml ("keyphrase_0",
"keyphrase_1", ...), I need to access the current index as well. I know I
can write a subquery to return row number of keyphrase_asset. Is that the
only way to go?
It's really difficult for me to debug my javascript code. I try to use
LogTransformer, but couldn't see where it outputs to.
--
Chamnap