Thanks Adam,
I am sorry but something went wrong, does the Arches server status matter
when running the "es" commands?
Before starting the server I ran:
(ENV) >python manage.py es index_database
Indexing concepts
Status: Passed, In Database: 6, Indexed: 6, Took: 3 seconds
Indexing resource type 'Archaeological Site'
Status: Failed, Resource Type: Archaeological Site, In Database: 0,
Indexed: 494, Took: 1 seconds
Indexing resource type 'Periods'
Status: Passed, Resource Type: Periods, In Database: 35, Indexed: 35, Took:
8 seconds
Indexing resource to resource relations
Status: Passed, In Database: 0, Indexed: 0, Took: 0 seconds
So there are three "Periods" records and 494 archaeological sites.
I started the server and went to the search page. There were only "Periods"
in the database, no sites.
Then, when the Arches server is up, I ran the three commands. The 494
archaeological site records
have disappeared.
Now, all the data were created by importing and I can import then again,
but I wonder how to fix the database
other than by re-building it.
Also, is it possible to browse and re-index the database using
Django/elasticsearch/SQL directly ?
Thanks,
Yuval
(ENV) >python manage.py es delete_indexes
deleting index : arches_jkc_strings
deleting index : arches_jkc_resource
deleting index : arches_jkc_resource_relations
(ENV) >python manage.py es setup_indexes
creating index : arches_jkc_strings
creating index : arches_jkc_resource_relations
creating index : arches_jkc_resource
creating index : arches_jkc_resource/d9766841-48bf-11e9-bb01-0024e8b0b180
creating index : arches_jkc_resource/6522f2cf-3dcd-11e9-b9cb-0024e8b0b180
(ENV) >python manage.py es index_database
Indexing concepts
Status: Passed, In Database: 6, Indexed: 6, Took: 0 seconds
Indexing resource type 'Archaeological Site'
Status: Passed, Resource Type: Archaeological Site, In Database: 0,
Indexed: 0, Took: 0 seconds
Indexing resource type 'Periods'
Status: Passed, Resource Type: Periods, In Database: 35, Indexed: 35, Took:
6 seconds
Indexing resource to resource relations
Status: Passed, In Database: 0, Indexed: 0, Took: 0 seconds
בתאריך יום ראשון, 24 במרץ 2019 בשעה 19:56:13 UTC+2, מאת Adam Cox:
> Hi Yuval, it sounds like elasticsearch has gotten out of sync with your
> database somehow. Please see my recent response to Johannes about
> reindexing the database, because it think that will solve your problem.
>
>
> Let me know how it goes.
>
> Adam
>
> On Sun, Mar 24, 2019, 10:27 AM Yuval Krymolowski <[email protected]
> <javascript:>> wrote:
>
>> Hello,
>>
>> In the search page, the left pane lists the records. When I click on the
>> title of a record (or 'edit'), a window opens
>> with a URL such as
>> http://localhost:8000/report/24fa609a-f230-4951-a587-a1ae404488fa
>> but with the error message:
>>
>> DoesNotExist at /report/24fa609a-f230-4951-a587-a1ae404488fa
>>
>> Resource matching query does not exist.
>>
>> The console output follows below.
>>
>>
>> What is the source of this problem? how to fix it?
>>
>> Thanks,
>> Yuval
>>
>> ------------------------[24/Mar/2019 17:16:07] "GET
>> /resource/descriptors/f68b0d2e-24ab-49c2-be40-50407c09b6b3 HTTP/1.1" 500
>> 26334
>> Internal Server Error: /report/24fa609a-f230-4951-a587-a1ae404488fa
>> Traceback (most recent call last):
>> File "C:\Python27\lib\site-packages\django\core\handlers\exception.py",
>> line 41, in inner
>> response = get_response(request)
>> File "C:\Python27\lib\site-packages\django\core\handlers\base.py", line
>> 187, in _get_response
>> response = self.process_exception_by_middleware(e, request)
>> File "C:\Python27\lib\site-packages\django\core\handlers\base.py", line
>> 185, in _get_response
>> response = wrapped_callback(request, *callback_args, **callback_kwargs)
>> File "C:\Python27\lib\site-packages\django\views\generic\base.py", line
>> 68, in view
>> return self.dispatch(request, *args, **kwargs)
>> File "C:\Python27\lib\site-packages\django\views\generic\base.py", line
>> 88, in dispatch
>> return handler(request, *args, **kwargs)
>> File "C:\Python27\lib\site-packages\arches\app\views\resource.py", line
>> 526, in get
>> resource = Resource.objects.get(pk=resourceid)
>> File "C:\Python27\lib\site-packages\django\db\models\manager.py", line 85,
>> in manager_method
>> return getattr(self.get_queryset(), name)(*args, **kwargs)
>> File "C:\Python27\lib\site-packages\django\db\models\query.py", line 380,
>> in get
>> self.model._meta.object_name
>> DoesNotExist: Resource matching query does not exist.
>> [24/Mar/2019 17:16:22] "GET /report/24fa609a-f230-4951-a587-a1ae404488fa
>> HTTP/1.1" 500 108003
>>
>> --
>> -- To post, send email to [email protected] <javascript:>. To
>> unsubscribe, send email to [email protected] <javascript:>.
>> For more information, visit
>> https://groups.google.com/d/forum/archesproject?hl=en
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "Arches Project" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected] <javascript:>.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
--
-- To post, send email to [email protected]. To unsubscribe, send
email to [email protected]. For more information,
visit https://groups.google.com/d/forum/archesproject?hl=en
---
You received this message because you are subscribed to the Google Groups
"Arches Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.