How to create search query in Share

cancel
Showing results for 
Search instead for 
Did you mean: 
miroslav
Customer

How to create search query in Share

Jump to solution

Hi, 

I created my own model and node type (mycustomtype). Now I would like to search according to these parameters via Share. I know how to create own form in advanced search, but  I would like to define a search query (and / or for individual properties).

Is it possible? 

Thank you.

1 Solution

Accepted Solutions
EddieMay
Alfresco Employee

Re: How to create search query in Share

Jump to solution

Hi @miroslav 

You should be able to search for properties like so:

dc:company:Hyland

This will limit search against a single property (dc:company).

To test this I created a custom content type called Whitepaper (following this example). This has 3 properties, one being dc:company

I created a Whitepaper and added Hyland as the company. Search for dc:company:Hyland returns one result:

Screenshot 2020-12-10 at 14.25.05.png

I also created a standard document & added the word "Hyland" in the name, title, body & description. Searching for "Hyland" returns only this document:

Screenshot 2020-12-10 at 14.24.45.png

Searching for dc:company:Hyland or TEXT:Hyland returns both documents.

HTH,

Digital Community Manager, Alfresco Software.
Problem solved? Click Accept as Solution!

View solution in original post

9 Replies
EddieMay
Alfresco Employee

Re: How to create search query in Share

Jump to solution

Hi @miroslav 

I'm not sure if I understand your requirement fully, but this blog might be helpful.

HTH,

Digital Community Manager, Alfresco Software.
Problem solved? Click Accept as Solution!
miroslav
Customer

Re: How to create search query in Share

Jump to solution

Hi @EddieMay , thank you for reply! The blog is realy usefull. 

I will ask differently, is it possible to use filter queries in Share application like "cm:creator:user1 OR  cm:creator:user2"?


angelborroy
Alfresco Employee

Re: How to create search query in Share

Jump to solution

You can perform search strings in different syntaxes:

https://docs.alfresco.com/search-enterprise/concepts/searchsyntax-APIs.html

The most common is AFTS, that has a wide variety of operators:

https://docs.alfresco.com/search-enterprise/concepts/searchsyntax-intro.html

Hyland Developer Evangelist
miroslav
Customer

Re: How to create search query in Share

Jump to solution

Thank you @angelborroy , is it possible to execute this query in Share (live/simple/advanced)? I have two property and would like to achieve conjunction (OR). Something like this pic2.jpg

EddieMay
Alfresco Employee

Re: How to create search query in Share

Jump to solution

Hi @miroslav 

Search tips shows you can search against such terms. It has an example of using 

creator:username

but creator:username searches against all nodes, including folders, etc.

Screenshot 2020-12-10 at 13.52.04.png

This result looks like it searched for "admin" or "eddie" everywhere, including within document text, titles, etc.

Digital Community Manager, Alfresco Software.
Problem solved? Click Accept as Solution!
EddieMay
Alfresco Employee

Re: How to create search query in Share

Jump to solution

Hi @miroslav 

You should be able to search for properties like so:

dc:company:Hyland

This will limit search against a single property (dc:company).

To test this I created a custom content type called Whitepaper (following this example). This has 3 properties, one being dc:company

I created a Whitepaper and added Hyland as the company. Search for dc:company:Hyland returns one result:

Screenshot 2020-12-10 at 14.25.05.png

I also created a standard document & added the word "Hyland" in the name, title, body & description. Searching for "Hyland" returns only this document:

Screenshot 2020-12-10 at 14.24.45.png

Searching for dc:company:Hyland or TEXT:Hyland returns both documents.

HTH,

Digital Community Manager, Alfresco Software.
Problem solved? Click Accept as Solution!
miroslav
Customer

Re: How to create search query in Share

Jump to solution

Thank you, the problem was with solr indexing. You can enter FTS expressions in the simple search field and that's exactly what I need.

EddieMay
Alfresco Employee

Re: How to create search query in Share

Jump to solution

Hi @miroslav 

Thanks for updating your thread & great news that you got it fixed.

Cheers,

Digital Community Manager, Alfresco Software.
Problem solved? Click Accept as Solution!
MarkVal
Active Member

Re: How to create search query in Share

Jump to solution

@EddieMay wrote:

Hi @miroslav 

You should be able to search for properties like so:

dc:company:Hyland

This will limit search against a single property (dc:company).

To test this I created a custom content type called Whitepaper (following this example or thishttps://homework-writer.com website). This has 3 properties, one being dc:company

I created a Whitepaper and added Hyland as the company. Search for dc:company:Hyland returns one result:

Screenshot 2020-12-10 at 14.25.05.png

I also created a standard document & added the word "Hyland" in the name, title, body & description. Searching for "Hyland" returns only this document:

Screenshot 2020-12-10 at 14.24.45.png

Searching for dc:company:Hyland or TEXT:Hyland returns both documents.

HTH,


There are some things that I do not know. Thanks a lot!