I want to search documents in specified folder. I mean ,as in below case, searching documents of mainfolder1.
How can I do this?? With lucene possible?? I know lucene can specify store. I don't know about folder.
-->company home
---->mainfolder1
------->doc1
------->doc2
---->mainfolder2
Looks like
+PATH:"/app:company_home/cm:mainfolder1//."
is what you want in your search expression.
The full glory details about Alfresco search in general in path queries in particular are at http://wiki.alfresco.com/wiki/Search#Path_Queries
Correct is
PATH:"/app:company_home/cm:mainfolder1/*"
as you do not need to search nodes at any depth but only direct children of main folder1.
You can find additional explanations here
http://alfrescoblog.com/2014/07/09/alfresco-lucene-tutorial/
Related
Our Share users currently have a static large list of parameters that they need to manually re-input everytime documents needs to be searched.
Is there any way of saving search/queries in Alfresco share?
This function was available in the g'old explorer UI, but unfortunately never got into Alfrescp Share or into Alfresco Digital Workspace. As a work around you may take a look into the Saved Search dashlet ?
There is a dashlet called Saved Search available.You can use that or you can create similar dashlet with your customization.
Sorry but I can't find documentation about this...
If I want to use more than one workspace in Alfresco, how can I specify the workspace to use?
For example, to access a node, I use an url like this:
workspace://SpacesStore/32da316f-9d2a-4e57-a28b-89d86bff6584
If I have various workspaces (A and B)... How can I difference one from another with this url?
And on the code side... when I use Alfresco API Java operations, I authenticate with user and password (with getAuthenticationService().authenticate method). And do something like, for example, a query to search a node (TYPE:"{mymodel}exp" AND PATH:"/app:company_home/app:user_homes/cm:mydir").
My question is the same... How can I specify one or other workspace to search in A or B? Has a different spacestore?
I want to assign a small code string to each document after it is uploaded in alfresco. Something like: '2012/314-39414'.
The code will be generated by a rule that depends on the user that uploaded the document, the time the document is uploaded and a unique number which will be incremented after each document upload.
Can I have help to implement this in Alfresco?
Use OnCreateNodePolicy (java code) to do this the cleanest way.
Search the net or Alfresco forums to look for examples or you could download the SDK and lookup current code which uses it.
My Drupal 6 site uses 3 custom node types that are hierarchically organized: page, book, library. I want to use Solr to index and search the content.
I want the search to return only Book nodes in the results.
But I want the search to use the contents of children (pages) and parents (libraries) when performing the search.
Can Solr be configured to index & search in this way?
Thanks!
You are going to have a couple of issues with this:
Solr isn't hierarchical by nature, it's denormalized so indexing a heirarchy is hard.
You're going to have to figure out how to boost various terms/fields based on where in the hierarchy they are (is the library more important than the book, so to speak).
Drupal has a specific configuration related to nodes and modifying that, by default, wouldn't be the easiest.
The Solr implementation is tightly tied to the database, so modifying the configuration would probably take a lot of effort on your part.
I would recommend you don't try to implement this, but if you did you could look at the Apache Solr Attachments module. You would have to do something similar... basically:
hook_modify_query to modify the actual indexing of the node
custom theme your search results to display this hierarchy
Or you could create a single giant field with a bunch of searchable text and use that as part of your searches.
I am looking for a way to control access to a node (my own content type), even when it has the "published" bit set. I have a custom field (datetime) that specifies when the node should be available to visitors. How do I hook in to Drupal 7 to do that?
Best regards, Egil.
Have a look on node_access(), you should be able to do what you need there.
I accomplished a similar thing using hook_node_access_records() and hook_node_grants(). My example is for a field within a node that restricts access on a group level, but the same concept works (more easily) for non-group content.
The description of what I did is here: https://drupal.stackexchange.com/questions/36269/how-to-restrict-node-access-to-nodes-based-on-field-value/83975#83975
However, it might be easier for you to follow Node Access Example Module: https://api.drupal.org/api/examples/node_access_example!node_access_example.module/7
That is exactly what I modified to get my code.