Skip to content

Bulk Document Indexing #296

@jbelke

Description

@jbelke

Description
Location: admin/plugins/meilisearch
As a User, when using the Meilisearch Strapi plugin, and utilizing the Update Button with a 1000+ data-set.

Expected behavior
Document count out of total will increment/transfer.
Currently sitting at: 0/1195 using the Update Feature.

Current behavior
Nothing happens.
When manually un-publishing/republishing an item in the collection, the documents will sync via hook.

Screenshots or Logs
Screen Shot 2021-11-01 at 10 42 19 PM
Screen Shot 2021-11-01 at 10 57 45 PM

After Manual Publishing:

Screen Shot 2021-11-01 at 11 59 45 PM
Screen Shot 2021-11-01 at 11 40 29 PM
Screen Shot 2021-11-01 at 11 59 03 PM

Environment (please complete the following information):

  • OS: OSX
  • MeiliSearch version: v0.23.1
  • strapi-plugin-meilisearch version: "strapi-plugin-meilisearch": "^0.3.3",
  • Browser: Chrome etc etc (Brave/Safari)
  • Strapi version: 3.6.8
  • Flags: --http-payload-size-limit=1048576000
  • Resources: 16/32GB of RAM

Other:

  • Able to upload the Sample Dataset without issue of Movies. (19k+)
{
    "numberOfDocuments": 19546,
    "isIndexing": false,
    "fieldDistribution": {
        "genres": 19456,
        "id": 19546,
        "overview": 19546,
        "poster": 19546,
        "release_date": 19546,
        "title": 19546
    }
}

Area of Interest: strapi-plugin-meilisearch/admin/src/components/Collections.js -> updateCollections.js

// Re-indexes all rows from a given collection to MeilISearch
  const updateCollections = async ({ collection }) => {
    setCollectionsList(prev =>
      prev.map(col => {
        if (col.name === collection)
          return { ...col, indexed: 'Start update...', _isChecked: true }
        return col
      })
    )
    const response = await request(`/${pluginId}/collections/${collection}/`, {
      method: 'PUT',
    })
    if (response.error) {
      errorNotifications(response)
    } else {
      successNotification({ message: `${collection} update started!` })
      watchUpdates({ collection }) // start watching
    }
    setUpdatedCollections(false) // ask for up to date data
  }
"databaseSize": 189247488,
    "lastUpdate": "2021-11-02T03:44:39.692897Z",

When Manually Un/Re-Publishing - Able to Confirm Data Transfer.

 "brand": {
            "numberOfDocuments": 11,
            "isIndexing": false,
            "fieldDistribution": {
                "Address": 11,
                "PointOfContact": 11,
                "Social": 11,
                "avatar": 11,
                "awards": 11,
                "brandProfileMedia": 11,
                "description": 11,
                "id": 11,
                "name": 11,
                "phone": 11,
                "products": 11,
                "salons": 11,
                "slogan": 11,
                "slug": 11,
                "url": 11
            }
        },

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions