Basically your component will pass some *query* to LSCS (i.e. in business terms: retrieve all documents tagged with a certain metadata). For example:a query like this -- q=TeamSite/Metadata/SomeKeyomeValue -- will return all assets that have a been tagged with "TeamSite/Metadata/SomeKey" EA with "SomeValue" as its value.
You could further refine the query such as q=metadata1:value1+AND+metadata2:value2. How this query is constructed is outlined in the LSCS guide.
Now take that component where you are seeing that "funky" expression. In that component, that query is being "dynamicized" (if that is a word) a little bit. User data could be used from the component input datums. Basically lets say you want to re-use this same component in two instances. For instance 1: you want all assets with metadata1:value1. For instance 2: you want all assets with metadata2:value2.
That component is using an "expression language" called OGNL (Object-Graph Navigation Language). It is a 3rd party library that is being used. If you look at that expression that you posted: it basically says that if "query" is not defined then use * (in search world its a catch-all) and if the content type is not defined then do the same. If they are defined then it'll use those valus to construct your query.
This is a sample component. If you feel comfortable using this OGNL expression language and having some flexible/dynamic queries then go for it. If you are more comfortable with simpler queries then go for that.
HTH!
Hi,I am not finding a way to append &sort=metadata to querystring after looking at LscsQuery class. It appears it only supports, max results,include content, start and end index. Is there a way to perform sort ?Thanks in advance.