Text field in item not searchable
My custom item has a text field for "Job Year" (text because there is not a number formatting without commas). I am trying to isolate a group of items based on this field (i.e., Job Year = 2016). I attempted to use PodioItem::filter, but in my reading of the documentation, it seemed you could not filter by a text value. I then began to work with Search in Application v2, but I cannot seem to access the field.
If I search the entire application for 2016, it does not return values of this field (though it returns appearances of 2016 in other fields). If I explicitly search the field, I get nothing:
PodioSearchResult::space( 123456789, array('query'=>'2016', 'search_fields'=>32145678...the rest of my array) );
The same call works if I search another field (i.e., title). I've tried using the field id instead, but that has no effect. The Search API documentation states that for items "title, text and number field values, comments, tags" are indexed. Since mine is a text field on an item, it seems as though it should be available for search.
Any help someone can provide would be greatly appreciated.
KMT
-
Hi,
I already googled and went to Podio documentation about the attributes applicable to the PodioSearchResult:: but haven't found any. Can you point me to the URL which indicates all possible attributes that can be used for the said function? Or if possible, can you help me what to do with this?
I have something like this:
$result = PodioSearchResult::app(12345678, array('query' => '729''limit' => 1));
I want to filter the query to only one search field. Thanks in advance.
-
Hi KMT,
I see.
Can you try using the `external_id` of the fields instead of using the ID in the 'search_fields' part of your call?
You can find the external ID of the fields by- Going to the app view
- Clicking on the wrench in the top left corner
- Clicking "Developer" in the menu
They will be listed under the "App fields" section.
Thanks,
Domenico
Please sign in to leave a comment.
Comments
3 comments