Document is unsearchable without property update

cancel
Showing results for 
Search instead for 
Did you mean: 
Active Member II

Document is unsearchable without property update

Hi All,

i am using Alfresco 4.1 and seeing a strange behavior . If i just upload a document in site and try to search it using

Advance search by selecting my custom type results 0 files. But when i update any property of that document ,it becomes searchable.

Can I do anything to resolve this issue or it is a default behavior.

 

Thanks,

Fouad

12 Replies
Senior Member

Re: Document is unsearchable without property update

Hi

Are you using lucene or SOLR?

Does normal search work? Is it only advanced search that is broken?

Is it just eventual consistency? SOLR does not index your change immediately.
Does waiting resolve the issue? In which case it is expected behviour.

I suspect you are confusing cause and coincidence ....

Andy

Active Member II

Re: Document is unsearchable without property update

Normal search is working even without updating property.

But when i select custom type in look for in advance search then document is searchable if i once update 

any of its property.

Yes I want resolve this issue.

Thanks,

Fouad

Active Member II

Re: Document is unsearchable without property update

Do any one have answer to this issue?

If i just upload a document in site and try to search it using

Advance search by selecting my custom type  in "look for" results 0 files.

But when i set any property of that document ,it becomes searchable.

Thanks,
Fouad

Senior Member

Re: Document is unsearchable without property update

Hi

There is not enough information here to work out what is going on.

No one can answer this issue with the information provided.

Advanced search uses the same information as normal search to find the document.

How are you trying to find the document? In normal search and advanced search?

What properties and what values are you searching for? What information has to be there to match?

What are you updating on the document?

Does the document have the data that matches before you update it? How do you know?

Have you got rules that only add stuff when it is updated? etc etc.

Andy

Active Member II

Re: Document is unsearchable without property update

Hi Andy,

Thanks for asking questions. 

Below are things I have done to search a file.

1. Uploaded a file named "Test.txt" in a folder having only one rule to have custom type on the uploaded docs.

2. And when I select content in "look for" option in advance search then my test file comes in result of search.

as shown below.

3.  Then I have searched it using advance search using name property and selecting my custom type in the "look for" option in advance search then it result 0 files.

4. But when I set any property of test.txt file it becomes searchable using custom type in Advance search.

My question is If I just upload a file. How can it become searchable using custom type in Advance search.?

When is the indexing generated of files uploaded of custom type.

* Below code is present in some of the custom property of the type I am using for search in content model.

<index enabled="true">
<atomic>true</atomic>
<stored>false</stored>
<tokenised>both</tokenised>
</index>

I am using Alfresco 4.1 and Solr with lucene as search engine.

Thanks,

Fouad 

Senior Member

Re: Document is unsearchable without property update

Hi

What is the rule? How exactly is it defined?

Andy

Active Member II

Re: Document is unsearchable without property update

Hi Andy,

Rule is to make all the document as custom type on upload.

It is defined as follows

Right click over a folder with no rules applied and click More then Manage Rules.

  1. Click Create Rules.
  2. Enter a name and a description (optional) for the rule.
  3. Select when the rule will be triggered:
    • Items are created or enter this folder: The rule will be applied to content that gets added to this folder. This includes any item that is copied to, created in, or uploaded to the folder.
    • Items are updated: When an item in this folder is modified, the rule will be applied to it.
    • Items are deleted or leave this folder: The rule will be applied to content that is moved out of the folder or deleted
  4. Select specialise Type in "Perform Action" and select You custom type.

I again verified after just upload the document becomes of my custom type as expected, But only few properties are showing on the node browser from all the properties defined in the content model of my custom type.  But when i update any properties of the document all the properties defined in custom type shows up in node browser and it becomes searchable

Customer

Re: Document is unsearchable without property update

Hi:

You can try to debug the "real search" that is done when using Alfresco advanced search for your custom type. Probably it includes some of the properties that are not consolidated when specializing content via rule, which may indicate a problem with your Alfresco search form config. Try this in custom-log4j.properties, do some search and look at the logs for the exact query:

log4j.logger.org.alfresco.repo.jscript.ScriptLogger=DEBUG
log4j.logger.org.alfresco.repo.jscript.Search=DEBUG

I imagine that if you only show the saved properties by the rule in the custom type Alfresco search form , you can search and find the document without problems.

A similar behaviour might be in a form with a constraint list field always searching by the one of the values (without this property being set in the content rule - and no default value for this list). 

Regards.

--C.

Senior Member

Re: Document is unsearchable without property update

Hi

So what is your type definition?

I assume your rule ONLY runs for create/enter and NOT for the other two options.

I assume the rule is synchornous....

Are you saying that.... "some mandatory properties are not set to default values when the type is set by the rule

..... and these mandatory properties do appear with their defaults when you edit any property (and no rule is expected to run)"

That does not sound right. However there is an easy work around if this is the case. You could set one of your  default values in a second action.

The indexing process is not going to see any properties that you do not see in the node browser.


Cheers

Andy