Skip to content

Releases: meilisearch/meilisearch-go

v0.28.0 ๐Ÿน

21 Aug 16:13
345439c
Compare
Choose a tag to compare

โš ๏ธ Breaking changes

  • Refactor meilisearch client wtih new client and documentation (#556 ) @Ja7ad
// Before
client := meilisearch.NewClient(meilisearch.ClientConfig{
	client := meilisearch.New("http://localhost:7700", meilisearch.WithAPIKey("foobar"))
                Host: "http://127.0.0.1:7700",

                APIKey: "masterKey",
        })

// Now
client := meilisearch.New("http://localhost:7700", meilisearch.WithAPIKey("foobar"))
  • Feat sort facets value by alphanumerical (SortFacetTypeAlpha) or count order (SortFacetTypeCount) (#558) @Ja7ad

Before:

// Before
client.Index("movies").UpdateFaceting(&meilisearch.Faceting{
      MaxValuesPerFacet: 2,
      SortFacetValuesBy: {
         "*": "count",
      }
  })

// Now
client.Index("movies").UpdateFaceting(&meilisearch.Faceting{
      MaxValuesPerFacet: 2,
      SortFacetValuesBy: {
         "*": SortFacetTypeCount,
      }
  })
  • Feat accept the frequency (Frequency) value for the matchingStrategy search (#565) @Ja7ad
// Before
resp, err := client.Index("movies").Search("big fat liar", &meilisearch.SearchRequest{
    MatchingStrategy:   "last",
})
// or
resp, err := client.Index("movies").Search("big fat liar", &meilisearch.SearchRequest{
    MatchingStrategy:   "all",
})

// Now
resp, err := client.Index("movies").Search("big fat liar", &meilisearch.SearchRequest{
    MatchingStrategy: Last,
})
// or
resp, err := client.Index("movies").Search("big fat liar", &meilisearch.SearchRequest{
    MatchingStrategy:   All,
})

๐Ÿš€ Enhancements

โš™๏ธ Maintenance/misc

  • Add makefile and badges for readme (#561) @Ja7ad

v0.27.2 ๐Ÿน

03 Aug 14:40
6b5e6fb
Compare
Choose a tag to compare

๐Ÿš€ Enhancements

๐Ÿ› Bug Fixes

  • Fix add json tag on search request (#551) @Ja7ad

Thanks again to @Ja7ad, ! ๐ŸŽ‰

v0.27.1 ๐Ÿน

30 Jul 08:00
59cdcef
Compare
Choose a tag to compare

๐Ÿš€ Enhancements

๐Ÿ› Bug Fixes

  • Fix allow typo tolerance to be disabled for an index (#545) @Ja7ad

Thanks again to @Ja7ad, @curquiza, and @migueltarga! ๐ŸŽ‰

v0.27.0 ๐Ÿน

01 Jul 11:59
aea59d3
Compare
Choose a tag to compare

โš ๏ธ Breaking changes

Breaking because Meilisearch v1.9 is breaking regarding vector display at search for the Hybrid search experimental feature. More detail in the v1.9 changelog

  • Changes related to the next Meilisearch release (v1.9.0) (#535)
    • Introduction of the retrieveVectors parameter at search -> when true, the display of the previous version is kept. Use it to avoid any breaking.

v0.26.3 ๐Ÿน

06 May 14:16
407897c
Compare
Choose a tag to compare

๐Ÿš€ Enhancements

  • Implement vector search experimental feature (#517) @jackielii
  • Alligned SearchRequest.Vector type to []float32 (#524) @LGXerxes
  • Add new search param showRankingScoreDetails (#528) @Tommy-42

๐Ÿ› Bug Fixes

โš™๏ธ Maintenance/misc

Thanks again to @LGXerxes, @Tommy-42, @brunoocasali, @curquiza, @jackielii, @thisisdev-patrick! ๐ŸŽ‰

v0.26.2 ๐Ÿน

19 Feb 09:53
0188a2d
Compare
Choose a tag to compare

๐Ÿš€ Enhancements

  • Enable to use DeleteDocumentsByFilter through IndexInterface (#511) @yuku

Thanks again to and @yuku! ๐ŸŽ‰

v0.26.1 ๐Ÿน

17 Jan 11:18
a893ec8
Compare
Choose a tag to compare

๐Ÿš€ Enhancements

โš™๏ธ Maintenance/misc

  • Update tests related to the next Meilisearch release (v1.6.0) (#503)

Thanks again to @brunoocasali, @curquiza, @fitimvata, ! ๐ŸŽ‰

v0.26.0 ๐Ÿน

02 Nov 16:29
d0a4910
Compare
Choose a tag to compare

โš ๏ธ Breaking changes: Enhanced Enumeration for Task Types & Statuses

The Meilisearch Go client has undergone a significant enhancement in how it handles task types and statuses. In prior versions, developers interfaced with tasks using generic strings. This methodology, while functional, lacked clarity and posed maintenance challenges.

TaskType and TaskStatus have transitioned from generic strings to definitive constants. This change augments code clarity, minimizes potential errors, and paves the way for smoother future updates.

Quick Exemple

// Before:
taskType := "documentDeletion"
...

// After:
taskType := meilisearch.TaskTypeDocumentDeletion

Real world example

// Before:
func Before() {
	resp, _ := meilisearchClient.GetTasks(&meilisearch.TasksQuery{
		Statuses: []string("enqueued", "processing"),
		Types: []string("documentDeletion", "documentAdditionOrUpdate"),
	})

	for _, task := range resp.Results {
		if task.Status == "processing" {
			// ...
		}

		if task.Type == "documentDeletion" {
			// ...
		}
	}
}

// After:
func After() {
	resp, _ := meilisearchClient.GetTasks(&meilisearch.TasksQuery{
		Statuses: []meilisearch.TaskStatus{
			meilisearch.TaskStatusEnqueued,
			meilisearch.TaskStatusProcessing,
		},
		Types: []meilisearch.TaskType{
			meilisearch.TaskTypeDocumentDeletion,
			meilisearch.TaskTypeDocumentAdditionOrUpdate,
		},
	})

	for _, task := range resp.Results {
		if task.Status == meilisearch.TaskStatusProcessing {
			// ...
		}

		if task.Type == meilisearch.TaskTypeDocumentDeletion {
			// ...
		}
	}
}

๐Ÿš€ Enhancements

  • Make client.WaitForTask use select and channels for polling (#495) @tadejsv

Thanks again to @42atomys, @curquiza, @datbeohbbh, and @tadejsv! ๐ŸŽ‰

v0.25.1 ๐Ÿน

13 Sep 17:49
252c1fb
Compare
Choose a tag to compare

๐Ÿš€ Enhancements

๐Ÿ› Bug Fixes

Thanks again to @Azanul, @Esmeralda-lad, @alallema, @aooohan, @barribarrier, @brunoocasali, @curquiza, @luigibarbato, @manujz, and @tonyghouse! ๐ŸŽ‰

v0.25.0 ๐Ÿน

05 Jun 11:57
e6ebf2f
Compare
Choose a tag to compare

Release CHANGELOG:

This version introduces features released on Meilisearch v1.2.0 ๐ŸŽ‰
Check out the changelog of Meilisearch v1.2.0 for more information on the changes.
โš ๏ธ If you want to adopt new features of this release, update the Meilisearch server to the according version.

๐Ÿš€ Enhancements

  • Addition of the method DeleteDocumentsByFilter, this method takes an interface{} which allows you to send different types of filters (string, []string, []interface{}{[]string{}}, ...). The filter field works precisely like the filter field used on the search method. See the docs on how to use filters. #440 @alallema

    โš ๏ธ You must configure the attributes you want to filter using the Index.UpdateFilterableAttributes().
    โš ๏ธ Remember to update your Meilisearch server to v1.2.0 or newer before adopting it.

  • Add the ability to add Filter in the DocumentsQuery. When a query with a filter is sent to getDocuments, it will filter the documents like the search method. See the docs on how to use filters. #439 @alallema

    โš ๏ธ You must configure the attributes you want to filter using the Index.UpdateFilterableAttributes().
    โš ๏ธ Remember to update your Meilisearch server to v1.2.0 or newer before adopting it.

Thanks again to @alallema, @curquiza ! ๐ŸŽ‰