cancel
Showing results for 
Search instead for 
Did you mean: 

How to create search query in Share

miroslav
Star Contributor
Star Contributor

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 ACCEPTED ANSWER

EddieMay
World-Class Innovator
World-Class Innovator

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:

image

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

image

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

HTH,

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

View answer in original post

9 REPLIES 9

EddieMay
World-Class Innovator
World-Class Innovator

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!

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"?


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

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 image

EddieMay
World-Class Innovator
World-Class Innovator

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.

image

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
World-Class Innovator
World-Class Innovator

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:

image

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

image

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

HTH,

Digital Community Manager, Alfresco Software.
Problem solved? Click Accept as 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
World-Class Innovator
World-Class Innovator

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
Champ on-the-rise
Champ on-the-rise

@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:

image

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

image

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

HTH,


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