Google Custom Search - Synonyms linked to Annotations labels - search

I'm trying to figure out how I can use Synonyms to only search against specific sites in the Annotations via the label - but can't find any information on how to do this.
Can you have Synonyms setup / linked to only search specific sites via labels? or how can you call the API to use a specific Synonym and pass which label to use and thus only search those sites that correspond to the label?
Any help / advice would be very much appreciated
Just to add we are using the Google Search API to fire off the searches and then return results programmatically

Managed to figure out how this should be done
Setup refinements and associated labels
Associate these to your annotations
Setup your Synonyms
You can now call your Synonyms and use the more: option to select the label you want use

Related

Do you have a custom active admin index page builder?

I would like to build a custom index page for ActiveAdmin.
I don't mean the records shown in the index or the list of columns to display -- I mean a custom view as described here:
https://github.com/activeadmin/activeadmin/blob/master/docs/3-index-pages/custom-index.md
A Google and SO search does not turn up any code samples. I have looked at the Active Admin code itself -- but also wanted to see some examples.
Ideally, I would be able to reuse the filter and scope and table components that the index provides -- I simply want to move things around quite a bit and add a custom component or two.
Anyone have any pointers or examples?
activeadmin has nice wiki page here https://github.com/activeadmin/activeadmin/wiki/Plugins
there u can find at least several implementation of custom index components
for instance
https://github.com/bys-control/activeadmin-index_as_calendar
https://github.com/zorab47/active_admin-sortable_tree
And of course take a look at sources
https://github.com/activeadmin/activeadmin/blob/master/lib/active_admin/views/index_as_grid.rb
https://github.com/activeadmin/activeadmin/blob/master/lib/active_admin/views/index_as_table.rb
https://github.com/activeadmin/activeadmin/blob/master/lib/active_admin/views/index_as_blog.rb
https://github.com/activeadmin/activeadmin/blob/master/lib/active_admin/views/index_as_block.rb
You can try to inherit from one of them and add your own missed parts, depends on your needs

Custom field info. in Search Engines

Can I show custom field info. on Search Engine Pages?
For example, when I type the keyword "google" on Google Search Engine, along with the regular search results, I also get some more information such as CEO, Founded, Headquarters, Founder, etc.. on the right sidebar, similar to the below image.
And I wondered if I could ever show up my company information also like that.
Any help would be greatly appreciated.
Yes, if you have a website accessible by Google's indexing bots and your page(s) contain Structured Data Markup providing such info, more specifically by Customizing the Knowledge Graph for your company (and provided that Google's indexing service considers the info relevant enough to show up in search results, of course).

Search a specific search of a journal article based on the user type

I have this requirement:
We have a journalarticle and we wish to have sections which have content for internal and external users for the application.
We are able to hide the content from rendering by implementing custom template on web content display and using a simple custom-field for a user which helps us to classify it.
Having said that when we search something as an external user, the search portlet is able to fetch an article where the search text is a part of internal user content, and due to the above mentioned template the content is not visible.
In short, from the user's perspective the resultant article does not match the searched term.
I wish to seek some pointer to check whether there is a mechanism to ensure that when an external user searches something then we only search the dynamic-element of the doc which matches the user type?
We have thousands of such articles and create multiple copy of the same article does not seems viable solution.. so any pointers would be a great help.
Liferay version : 6.2 GA4 CE
Thanks!
AJ
First of all: Not finding a search term in a document can be a sign of good working synonym resolution in the search engine. It's questionable if this behaviour is always wrong or only in this particular case. Remember google bombs?
That being said, I believe that this architecture of half-visible documents is flawed from the beginning. Ideally I'd suggest to change it, for example by splitting the information to two articles, so that you can use the standard permissions to resolve. If you link both, you can determine how/which article or template to use. It's not an ideal solution, but might be a workaround.
Another workaround might be to change Liferay's indexer component and index two different versions of the article, with two different permissions. Of course, you'll have to change the search side as well, so that you'll find each article at most once, even if it's now twice in the search engine.
Again - not ideal, but might be the quickest fix that you can get right now without changing the underlying architecture. However, to change the underlying architecture is my actual recommendation.

how to access google define feature in a batch

Suppose I have a huge set of noisy phrases. For each one of them, I want to check if it is defined by some resources by using the google define feature. Once I type "define my_phrase" to the google search box, if the retrieved results contain the definition panel (e.g. https://www.google.com/#q=define+home+cooking), I put it into my phrase pool.
I'm wondering is this possible to do this task in a batch so that I don't have to type each of the phrase manually one by one? It would be great if this could be achieved from a unix terminal but windows is also welcome!
I heard of google-app-engine but I only have a rough idea and not sure if it could help.
Thanks!
as starting point, you may try and play with the Google Custom search following API reference - Xml results
https://developers.google.com/custom-search/docs/xml_results?hl=en&csw=1#XML_Results
Be aware of:
google TOS for this service
quantity courtesy limit

Grails (On App Engine) - Basic Search Functionality

What I need is Search Scaffolding but in its absence I was wondering if you could point me in the direction of any really simple examples for adding search to a domain.
I can't use the searchable plugin as it conflicts with the AppEngine plugin (Unless someone has got this to work?). I just need to be able to filter the scaffold list to contain only the results which match the query. I don't need a pure text box solution, I imagine it too look exactly like the 'create' form except when you submit you get a list of matching objects.
I hope this makes sense, thanks in advance!
Gav
Google App Engine - Full Text Search

Resources