Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    • Switch to GitLab Next
  • Sign in / Register
  • Mayan EDMS Mayan EDMS
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 192
    • Issues 192
    • List
    • Boards
    • Service Desk
    • Milestones
    • Requirements
  • Merge requests 9
    • Merge requests 9
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Mayan EDMSMayan EDMS
  • Mayan EDMSMayan EDMS
  • Issues
  • #1009
Closed
Open
Issue created Jun 27, 2021 by Raimar Sandner@PiQuer

[4.0.7] Whoosh backend: searching for metadata values gives wrong/erratic results

I switched to the Whoosh backend because I was affected by issue #983 (closed). Even though I can now search for file contents again, searching for metadata seems to be broken.

Steps to reproduce, as an example:

  1. Create metadata type "amount" and attach it to a document type.
  2. Create a document with "amount" set to "10.00".
  3. Go to advanced search.
  4. Enter "10.00" in the Metadata value field.

Expected result: the document should be found. Actual result: no result.

I already tried to rebuild the search index without success.

However, I'm not completely sure how reproducible this issue is. Searching for metadata values gives me very erratic results. I also have another metadata type "date", which contains dates in the form YYYY-MM-DD. Searching for Matadata value "2021" produces many results correct results where 2021 is part of the metadata value. Searching for Metadata value "2021-06-03" gives me several documents with date "2021-03-06", even though other documents with the date 2021-06-03 exist as well. Searching for Metadata value "2021-06-02" returns document with date "2021-06-02" as well as "2021-02-06". Searching for 2021-02-10 does not return any results, even though it should.

In the logs I found:

[2021-06-27 12:33:11,291: ERROR/ForkPoolWorker-7888] Task mayan.apps.dynamic_search.tasks.task_deindex_instance[0d5ce54a-b459-4451-9f37-149d0d144b32] raised unexpected: DoesNotExist('IndexInstanceNode matching query does not exist.')                                        
Traceback (most recent call last):                                                                                                                                                                                                                                               
  File "/opt/mayan-edms/lib/python3.7/site-packages/celery/app/trace.py", line 412, in trace_task                                                                                                                                                                                
    R = retval = fun(*args, **kwargs)                                                                                                                                                                                                                                            
  File "/opt/mayan-edms/lib/python3.7/site-packages/celery/app/trace.py", line 704, in __protected_call__                                                                                                                                                                        
    return self.run(*args, **kwargs)                                                                                                                                                                                                                                             
  File "/opt/mayan-edms/lib/python3.7/site-packages/mayan/apps/dynamic_search/tasks.py", line 22, in task_deindex_instance                                                                                                                                                       
    instance = Model._meta.default_manager.get(pk=object_id)                                                                                                                                                                                                                     
  File "/opt/mayan-edms/lib/python3.7/site-packages/django/db/models/manager.py", line 82, in manager_method                                                                                                                                                                     
    return getattr(self.get_queryset(), name)(*args, **kwargs)                                                                                                                                                                                                                   
  File "/opt/mayan-edms/lib/python3.7/site-packages/django/db/models/query.py", line 408, in get                                                                                                                                                                                 
    self.model._meta.object_name                                                                                                                                                                                                                                                 
mayan.apps.document_indexing.models.IndexInstanceNode.DoesNotExist: IndexInstanceNode matching query does not exist.

but I'm not sure whether this is related.

Assignee
Assign to
Time tracking