Data from Field

michel.weber
Posts: 256
Joined: Sat Oct 08, 2005 12:40 pm

Data from Field

Post by michel.weber »

Hi, i have a problem with 'additional fields' and 'Data from Field'.
I have created an additional field, declared it 'searchable', 'sortable' and 'output' then i added it to the 'Data from Field'.
I rewalked my site, and when i look at the results of a query my extra field shows up in the XML output and contains the correct values but ...

in the walk settings 'index filed' list my field does not appear, and when i search for the value, the documents are not found.

What am i missing here?
michel.weber
Posts: 256
Joined: Sat Oct 08, 2005 12:40 pm

Data from Field

Post by michel.weber »

Hi i found out how to do it.

How i wish the appliance documentation was a bit more 'intuitive'
User avatar
mark
Site Admin
Posts: 5519
Joined: Tue Apr 25, 2000 6:56 pm

Data from Field

Post by mark »

Could post your solution to aid others?
michel.weber
Posts: 256
Joined: Sat Oct 08, 2005 12:40 pm

Data from Field

Post by michel.weber »

Hi

In fact i have 4 profiles which are merged via replication into a global profile. The pages are coming from a dynamic web site and it is not possible to discriminate via the url (to use categories for example)
So i added an additional field lets say 'filingplan' which i populate via 'DATA from field'. Nothing subtle about it :
In all the profiles i have defined an additional fiel of type 'Integer' called 'filingplan'
In thr source profiles i have defined the 'data from field column like this :
Profile Search Replace Meta field which_field
PR1 .+ 1 URL Extra_Field1
PR2 .+ 2 URL Extra_Field1
PR3 .+ 4 URL Extra_Field1
PR4 .+ 8 URL Extra_Field1

So if i want to restrict research to 'pr1' in my destination profil, i simply specify &af1eq=1


The only problem i have, is that this does not allow to search several profiles at the same time. i'm not sure this is at all possible?

------------------------------------------------

Now that i got started here is a tougher question (i'm afraid i don't know anything about regexp).

I have documents which have nothing in the description field. So i would like to populate this filed from a <div> tag using the 'data from field'. Unfortunately so far i had no luck.

The text would contain something like this :
<DIV id="sla_shortdesc_desc">blah
blah</div>
(notice the (optional) new line in the middle.
I would like to get the 'blah blah' part displayed as the 'description'

Can anyone help with this? what do i need to put in the individual fields ?
Search Replace Meta field which_field
? ? ? ? description
User avatar
mark
Site Admin
Posts: 5519
Joined: Tue Apr 25, 2000 6:56 pm

Data from Field

Post by mark »

I think you could search multiple subprofiles by specifying &af1eq=(1,2) if you used type Text for that field.

Your new question would have been better in a new thread, but such as it is...

Try
search: >><div id\="sla_shortdesc_desc">=!</div>+</div>
replace: \2
meta:
field: HTML
which: description
michel.weber
Posts: 256
Joined: Sat Oct 08, 2005 12:40 pm

Data from Field

Post by michel.weber »

Thanks for your quick reply.

Your regexp works fine except that somewhere on the way all diacritical marks are lost. In fact it looks like the data is not transcoded form the source charset (iso-8859-1) to the storage charset (utf-8).
User avatar
Kai
Site Admin
Posts: 1272
Joined: Tue Apr 25, 2000 1:27 pm

Data from Field

Post by Kai »

The charset mapping issue has been noted for a fix in a future release.
michel.weber
Posts: 256
Joined: Sat Oct 08, 2005 12:40 pm

Data from Field

Post by michel.weber »

Mark

Unfortunately specifying '&af1eq=(1,2)' does not work (no matches)

Kai

Any idea whan this will happen? This might get critical in the future.
michel.weber
Posts: 256
Joined: Sat Oct 08, 2005 12:40 pm

Data from Field

Post by michel.weber »

Any reaction?
User avatar
Kai
Site Admin
Posts: 1272
Joined: Tue Apr 25, 2000 1:27 pm

Data from Field

Post by Kai »

We should have the charset issue fixed by mid-July.

For the Additional Fields, the only currently supported query operators are relational (equal, less than, etc.). You could use `&af1gte=1&af1lte=2' to match 1 or 2, but of course that method fails for non-consecutive or non-range values.