Limiting Length of %asset_contents% in Searches

Hi. I am doing a search through a series of pages based on categories. When i get the search results i would like to have:

    

%asset_short_name_linked%

%asset_contents%



But i would like to have asset_contents only show the first paragraph or 25 words or so. Is there anyway of limiting the amount of asset_contents that is printed out?

Thanks.

[quote]But i would like to have asset_contents only show the first paragraph or 25 words or so. Is there anyway of limiting the amount of asset_contents that is printed out?
[right][post=“10502”]<{POST_SNAPBACK}>[/post][/right][/quote]



There is no way of doing this at the moment. Usually we recommend using a Description metadata field for search results.

I'm trying to achieve the same results (like BenFro had displayed) for a search page but am not sure how to set that up in metadata field? Would appreciate if anyone can list down the steps?


Also, I would like to have the search word entered by the user to be displayed on the result page. Have tried a few keywords but doesn't really work. Can't use %keywords_query% because it will also displays the text field? Any suggestions?



Thank you very much,

Lynn

Essentially, you create a schema that has a text field named “Description”. You then apply this schema to your site and for each asset, fill in the description for that asset.


Then, on your search page, you can display the description for the asset by using the keyword %asset_metadata_Description%



Also, the keyword for the search terms on the results (or no results) bodycopy is %<field_name>_query_terms%. You can find all the keywords in the Search Manual from this page:



http://matrix.squiz.net/download/documentation

Thank you very much Avi,


I've got the both the description and field name to appear.



I've got another question - is it possible to set the search manager to somehow automatically grab these short description instead of having to filling the description for each asset?



Thanks again!

[quote]I’ve got another question - is  it possible to set the search manager to somehow automatically grab these short description instead of having to filling the description for each asset?
[right][post=“10965”]<{POST_SNAPBACK}>[/post][/right][/quote]



At the moment, no. You have to fill in the description field manually.

[quote]At the moment, no. You have to fill in the description field manually.
[right][post=“10966”]<{POST_SNAPBACK}>[/post][/right][/quote]



May I find out if Squiz plan to implement this feature at all? It’ll be quite a hassle especially for companies with large website to fill in each asset.

[quote]May I find out if Squiz plan to implement this feature at all? It’ll be quite a hassle especially for companies with large website to fill in each asset.
[right][post=“10967”]<{POST_SNAPBACK}>[/post][/right][/quote]



There are no plans for this feature at this stage. You are free to suggest the feature via our Bug Tracker or contact your Project Manager if you wish to fund development of this feature.



Though, its quite a difficult thing to do: How does the system know the description of the current asset?

[quote]There are no plans for this feature at this stage. You are free to suggest the feature via our Bug Tracker or contact your Project Manager if you wish to fund development of this feature.
[right][post=“10970”]<{POST_SNAPBACK}>[/post][/right][/quote]



We already filed this bug.



I already do something similar on our this bug, although the summaries are created by a script which then adds the generated content to Matrix. It does rely on well written content that has sufficient information at the start fo the document though.

There is a related Matrix Specification for this feature request, if you are interested.


http://matrix.squiz.net/developer/specifications/core/asset-content-summary-keyword