Custom Asset not getting indexed


(Nic Hubbard) #1

We built a custom asset for audio assets which are on a separate media server. We call them Remote Audio assets and the asset extends from the Page asset.


It seems though that only the name and short name have been indexed, and I cannot search for any of the other attributes that we created. I have the search page set to include all, and obviously added our custom asset as a searchable type. The assets can be found if their Name is searched for, but most of the time our users would be searching for the artist or event fields. Wouldn't Include All in the search fields look at all asset attributes?



Is there something that I needed to do to a custom asset to have the custom fields included in the search index? It also seems that when I try to re-index our custom assets, that it never finishes, and we get "Unable to find a source job with the codename "hipo_job_reindex-32547" [HIPO0057]" errors.



Thanks guys.


(Greg Sherwood) #2

I believe the attributes in the management.inc file need to have 'is_admin' => 0 in the array to tell Matrix they are not admin attributes and can be indexed.


(Nic Hubbard) #3

Hmmm, I checked our asset and it did have that line for each of the array items.

Is there a more direct way of checking if certain attributes have been indexed?

The indexing continues to fail at the end, would this mean that SOME of the assets did get indexed, or does it revert back?

(Greg Sherwood) #4

SELECT * FROM sq_sch_idx WHERE assetid = 'xxx';



That will show you what words are indexed for an asset, including the field they were found in (attribute or metadata) and the name of the field. You will see components like attr:short_name, meaning the value was found in the short_name attribute. If none of your custom attributes are there, they have not been indexed.



You can also do something like:

SELECT DISTINCT(component) FROM sq_sch_idx WHERE type_code = 'page_remote_audio';



That will show you all the components being indexed for all assets of your custom type.


(Nic Hubbard) #5

[quote]SELECT * FROM sq_sch_idx WHERE assetid = 'xxx';


That will show you what words are indexed for an asset, including the field they were found in (attribute or metadata) and the name of the field. You will see components like attr:short_name, meaning the value was found in the short_name attribute. If none of your custom attributes are there, they have not been indexed.



You can also do something like:

SELECT DISTINCT(component) FROM sq_sch_idx WHERE type_code = 'page_remote_audio';



That will show you all the components being indexed for all assets of your custom type.[/quote]



Thanks Greg. Yeah, our asset attributes are not being indexed:


    		value		| assetid |	type_code	 |	 component	  |   type   | score 
    ---------------------+---------+------------------+--------------------+----------+-------
     may				 | 34806   | puc_remote_audio | __name__		   | text	 |   100
     2008				| 34806   | puc_remote_audio | __name__		   | text	 |   100
     may				 | 34806   | puc_remote_audio | __short_name__	 | text	 |	 1
     2008				| 34806   | puc_remote_audio | __short_name__	 | text	 |	 1
     2008-10-08 14:14:58 | 34806   | puc_remote_audio | __created__		| datetime |	 1
     2008-10-08 14:17:02 | 34806   | puc_remote_audio | __updated__		| datetime |	 1
     2008-10-08 14:14:59 | 34806   | puc_remote_audio | __published__	  | datetime |	 1
     2008-10-08 14:14:59 | 34806   | puc_remote_audio | __status_changed__ | datetime |	 1
     34806			   | 34806   | puc_remote_audio | __assetid__		| int	  |	 1
     2008-05-08 --:--:-- | 34806   | puc_remote_audio | metadata:34757	 | datetime |	 1
     1969-12-31 15:59:59 | 34806   | puc_remote_audio | metadata:18473	 | datetime |	 1
     1969-12-31 15:59:59 | 34806   | puc_remote_audio | metadata:360	   | datetime |	 1

(Nic Hubbard) #6

[quote]You can also do something like:
SELECT DISTINCT(component) FROM sq_sch_idx WHERE type_code = 'page_remote_audio';



That will show you all the components being indexed for all assets of your custom type.[/quote]



Interesting, when I run this I get the following:


    puc_matrix_3-16-2=> SELECT DISTINCT(component) FROM sq_sch_idx WHERE type_code = 'puc_remote_audio';
    	 component	  
    --------------------
     __assetid__
     __created__
     __name__
     __published__
     __short_name__
     __status_changed__
     __updated__
     attr:album
     attr:artist
     attr:name
     attr:remote_url
     attr:short_name
     attr:song
     attr:year
     metadata:18473
     metadata:34757
     metadata:360


This is different than what I posted previously, and it is interesting that attr:album and the other attr are included in this. Does this mean that they are getting indexed? Or no?

(Greg Sherwood) #7

Yes, it means they are indexed. Select from that table where component = one of those and see which assets they are indexed for.


(Nic Hubbard) #8

Thanks for the help Greg.

This is what I did, and what I get:

    puc_matrix_3-16-2=> SELECT DISTINCT(component) FROM sq_sch_idx WHERE component = 'attr:artist';
      component  
    -------------
     attr:artist
    (1 row)
puc_matrix_3-16-2=> SELECT DISTINCT(component) FROM sq_sch_idx WHERE component = 'attr:song';
 component 
-----------
 attr:song
(1 row)</pre><br />

Did I do this correctly? I am not the best when it comes to database calls.

(Mark Brydon) #9

[quote]Thanks for the help Greg.


This is what I did, and what I get:


    puc_matrix_3-16-2=> SELECT DISTINCT(component) FROM sq_sch_idx WHERE component = 'attr:artist';
      component  
    -------------
     attr:artist
    (1 row)
    
    puc_matrix_3-16-2=> SELECT DISTINCT(component) FROM sq_sch_idx WHERE component = 'attr:song';
     component 
    -----------
     attr:song
    (1 row)


Did I do this correctly? I am not the best when it comes to database calls.[/quote]
Hi Nic,

You would probably want the following query instead, as the above returns the matching value in the WHERE clause.

    SELECT assetid FROM sq_sch_idx WHERE component = 'attr:artist';

This will return the asset IDs where the "artist" attribute is indexed.

(Nic Hubbard) #10

Ok, some strangeness going on here. Mark, I ran the query you gave me, and I got no results. I reindexed, and realized there was 1 custom asset that we had not indexed for a while, so I did that, and now when I run:

    SELECT DISTINCT(component) FROM sq_sch_idx WHERE type_code = 'puc_remote_audio';


I get none of my custom asset attributes:

    puc_matrix_3-16-2=> SELECT DISTINCT(component) FROM sq_sch_idx WHERE type_code = 'puc_remote_audio';
    	 component	  
    --------------------
     __assetid__
     __created__
     __name__
     __published__
     __short_name__
     __status_changed__
     __updated__
     metadata:18473
     metadata:34757
     metadata:360
    (10 rows)


I don't get it, but maybe it is not something that can be easily solved on the forums. I do appreciate all the help!

(Mark Brydon) #11

[quote]Ok, some strangeness going on here. Mark, I ran the query you gave me, and I got no results. I reindexed, and realized there was 1 custom asset that we had not indexed for a while, so I did that, and now when I run:

    SELECT DISTINCT(component) FROM sq_sch_idx WHERE type_code = 'puc_remote_audio';


I get none of my custom asset attributes...[/quote]
This can happen when the attribute values are below the word length of the search index (default = 4 character minimum).
Please verify the values set on the asset itself to see if this is the case.

(Nic Hubbard) #12

[quote]This can happen when the attribute values are below the word length of the search index (default = 4 character minimum).
Please verify the values set on the asset itself to see if this is the case.[/quote]



No, this is not the case. The values in this field are almost always over 4 characters. :frowning:


(Mark Brydon) #13

I think we might have to look at this off the forum but I have one more suggestion.

Are there any "Global Asset Type" weightings on this asset type (Search Manager > Global Weights), and if so, are these attributes being indexed?


(Nic Hubbard) #14

[quote]I think we might have to look at this off the forum but I have one more suggestion.
Are there any "Global Asset Type" weightings on this asset type (Search Manager > Global Weights), and if so, are these attributes being indexed?[/quote]



No, I had that thought too, there are no settings for that custom asset in the search manager.



I will have to contact support after our budget for a new support pack goes through. I do appreciate the help here!


(Mark Brydon) #15

[quote]No, I had that thought too, there are no settings for that custom asset in the search manager.
I will have to contact support after our budget for a new support pack goes through. I do appreciate the help here![/quote]

No problems Nic :slight_smile: