Razuna API Search CustomFields and Searchtext


#1

Hi Everyone,

i’m new to razuna and i would like to search for a specific custom field and a Search text.

I Tried the following API-Call:

/v2/search.cfc?method=searchassets&api_key=1234567890&searchfor=customfieldvalue:(C1239810239120938S015),TestText&folderid=ABCDFGH4567890&show=all&maxrows=100&showrenditions=false

But the results only have the custom field filter and the Textsearch doesn’t work properly. I also would like to add text like “Test Text”.

Do you have any recommendations for me ?

Thanks a lot for your help.

Cheers,


#2

Check out all the examples we have at
http://wiki.razuna.com/display/ecp/Search+API2


#3

Hi Nitai,

thanks for your answer.
I Already checked all the examples and wasn’t able to find one with a customfield and text search.

There are examples like:

/global/api2/search.cfc?method=searchassets&api_key=54592180-7060-4D4B-BC74-2566F4B2F943&searchfor=batman*&show=img&showrenditions=true

AND

/global/api2/search.cfc?method=searchassets&api_key=54592180-7060-4D4B-BC74-2566F4B2F943
&searchfor=customfieldvalue:(+255F307E-AE5A-4E66-AD2F6BBE81D0541C +audrey) AND customfieldvalue:(+237503B5-BB08-4658-8E4EFC2759847F07 +T)

What i was looking for is the combination of a customfield and searchfor “batman” :slight_smile: I Tried:

/global/api2/search.cfc?method=searchassets&api_key=54592180-7060-4D4B-BC74-2566F4B2F943
&searchfor=customfieldvalue:(+255F307E-AE5A-4E66-AD2F6BBE81D0541C +audrey),batman

AND

/global/api2/search.cfc?method=searchassets&api_key=54592180-7060-4D4B-BC74-2566F4B2F943
&searchfor=customfieldvalue:(+255F307E-AE5A-4E66-AD2F6BBE81D0541C +audrey)&searchfor=batman

But the result was just the search for the customfield and not a search for the term “batman”. I would like a combination of both.
So the customfield value and the searchterm “batman”. :slight_smile:

Thanks a lot.

Cheers.


#4

Any other hints or infos ? Or was anybody able to do a API call with customfieldvalue and searchvalue with proper results ?


#5

Hi,
Since version 1.8 I think, when you use custom field in search, you must drop the hyphens and the plus sign is no longer required.

Example of searchfor I use ( #[flowVars.custom_field_last_valid_without_hyphen] is replaced by the custom field id without hyphen) :
extension:(xlsx) AND (customfieldvalue:(#[flowVars.custom_field_last_valid_without_hyphen]T) OR customfieldvalue:(#[flowVars.custom_field_last_valid_without_hyphen]F)

HTH


#6

Hi,

thanks for your answer.
You*re right, that’s how it works today and i also used it like this (my first post).

My Question was more about the Searchfor field. So a combination of customfield Search and Text Search. If i use both separately everything works really great. If i want to combine it, i just get the results of the customfiled filter and not combined with the result of the Search text.

Cheers,