Controlling order of indexing of resource types for Elasticsearch?

15 views
Skip to first unread message

David Osborne

unread,
Mar 17, 2020, 9:44:09 AM3/17/20
to arches...@googlegroups.com
I needed to re-index our database and now the search results sidebar on the left of the search page shows the Information resources first. Is it possible to have the Heritage Assets listed first? Running python manage.py es index_resources the Information resources are processed before Activity and Heritage Asset resources,

In ~/Projects/ENV/lib/python2.7/site-packages/arches/app/utils/index_database.py, which is untimately called from python manage.py es index_resources, there's a function index_resources_by_type which could be used to index resources in a desired order but there's no obvious way to invoke it.

(Arches 4.4.2, Ubuntu 16.04)

David

Alina Myklebust

unread,
Mar 23, 2020, 3:41:16 PM3/23/20
to Arches Project
Hi David,

Were you able to find a solution for this yet? I may recall a similar question in the past, so I'll run a search to see what comes up.  

Best,

Alina

Alexei Peters

unread,
Mar 23, 2020, 4:10:23 PM3/23/20
to David Osborne, Arches Project, Alina Myklebust
Hi David,
This is a bit of a hack, but would achieve what I believe you are looking for.
  1.  Go to the graph editor for the resource type you want to re-index.
  2. From the "Manage" button in the top left, select "Functions"
  3. Select the "Define Resource Descriptors" from the left panel
  4. In the "Define Resource Descriptors" center panel click the "Re-Index" button in the top right corner.
This will effectively index all the resources of that type.  I'm unsure if it will affect the ordering in the search results panel, but it's worth a shot.
Cheers,
Alexei

Director of Web Development - Farallon Geographics, Inc. - 971.227.3173


--
-- To post, send email to arches...@googlegroups.com. To unsubscribe, send email to archesprojec...@googlegroups.com. 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 archesprojec...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/archesproject/9c94d39b-1260-4630-b050-248814a1fe3a%40googlegroups.com.

David Osborne

unread,
Mar 24, 2020, 8:44:30 AM3/24/20
to Arches Project
Hi Alexei

Thank you, that worked! I first tried re-indexing the Heritage Assets, the resource we wanted to appear in the search results panel. That had no effect, so I tried in turn the Activity and Information resources and it was after re-indexing the Information resources that the Heritage Assets now appear in the search results.

Hope you and everyone in the Arches community are staying safe and well.

Best wishes
David

On Monday, 23 March 2020 20:10:23 UTC, Alexei Peters wrote:
Hi David,
This is a bit of a hack, but would achieve what I believe you are looking for.
  1.  Go to the graph editor for the resource type you want to re-index.
  2. From the "Manage" button in the top left, select "Functions"
  3. Select the "Define Resource Descriptors" from the left panel
  4. In the "Define Resource Descriptors" center panel click the "Re-Index" button in the top right corner.
This will effectively index all the resources of that type.  I'm unsure if it will affect the ordering in the search results panel, but it's worth a shot.
Cheers,
Alexei

Director of Web Development - Farallon Geographics, Inc. - 971.227.3173


On Mon, Mar 23, 2020 at 12:41 PM Alina Myklebust <amykl...@getty.edu> wrote:
Hi David,

Were you able to find a solution for this yet? I may recall a similar question in the past, so I'll run a search to see what comes up.  

Best,

Alina


On Tuesday, March 17, 2020 at 6:44:09 AM UTC-7, David Osborne wrote:
I needed to re-index our database and now the search results sidebar on the left of the search page shows the Information resources first. Is it possible to have the Heritage Assets listed first? Running python manage.py es index_resources the Information resources are processed before Activity and Heritage Asset resources,

In ~/Projects/ENV/lib/python2.7/site-packages/arches/app/utils/index_database.py, which is untimately called from python manage.py es index_resources, there's a function index_resources_by_type which could be used to index resources in a desired order but there's no obvious way to invoke it.

(Arches 4.4.2, Ubuntu 16.04)

David

--
-- To post, send email to arches...@googlegroups.com. To unsubscribe, send email to arches...@googlegroups.com. 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 arches...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages