GithubHelp home page GithubHelp logo

Comments (29)

hi019 avatar hi019 commented on July 21, 2024 5

I'll also implement my other changes from my fork here when I have time

from laravel-scout-typesense-driver.

hi019 avatar hi019 commented on July 21, 2024 3

From what I understand after reading the Scout docs, an engine is the search provider itself, like Algolia or in this case Typesense. And a driver is what interfaces between the engine and Laravel code.

So, while I can't find any Scout naming conventions, it would make sense to name this repository & the package laravel-scout-typesense-driver.

from laravel-scout-typesense-driver.

jasonbosco avatar jasonbosco commented on July 21, 2024 2

Thank you @hi019 and @AbdullahFaqeir for making this happen, and thank you to everyone who helped beta test this change!

from laravel-scout-typesense-driver.

jasonbosco avatar jasonbosco commented on July 21, 2024 1

@hi019 On a side note, I'd love to invite you to join our Slack community in case we need to chat in real-time.

from laravel-scout-typesense-driver.

jasonbosco avatar jasonbosco commented on July 21, 2024 1

@hi019 Mind updating the checklist in this PR's description?

from laravel-scout-typesense-driver.

hi019 avatar hi019 commented on July 21, 2024 1

Yep, I'll update it later today. Forgot I had edit permissions :)

from laravel-scout-typesense-driver.

jasonbosco avatar jasonbosco commented on July 21, 2024 1

@hi019 Sounds good. I'll stand by.

And thank you for the research on naming the repo & package.

from laravel-scout-typesense-driver.

hi019 avatar hi019 commented on July 21, 2024

We should also mark devloopsnet/laravel-typesense as abandoned in Packagist and list this as its replacement, assuming that is the case

from laravel-scout-typesense-driver.

jasonbosco avatar jasonbosco commented on July 21, 2024

Ah, didn't know that was a thing. Thanks @hi019. I've added it to the list.

from laravel-scout-typesense-driver.

jasonbosco avatar jasonbosco commented on July 21, 2024

Also, do you want to take a stab at making these updates? :)

from laravel-scout-typesense-driver.

hi019 avatar hi019 commented on July 21, 2024

Sure, I'll do that. I did a similar thing for https://github.com/hi019/laravel-scout-typesense :)

from laravel-scout-typesense-driver.

jasonbosco avatar jasonbosco commented on July 21, 2024

Awesome! Thank you. I'll assign this issue to you, so others know that you're working on it.

from laravel-scout-typesense-driver.

manavo avatar manavo commented on July 21, 2024

Guess the issue description at the top needs updating now that the PR is merged? Not sure what’s left now, or is the migration complete?

from laravel-scout-typesense-driver.

hi019 avatar hi019 commented on July 21, 2024

I've updated the checklist. Everything is done on this repository's side πŸ‘

from laravel-scout-typesense-driver.

jasonbosco avatar jasonbosco commented on July 21, 2024

Thank you @hi019!

I was going to publish the package to packagist, but I wanted to confirm if the package/repo naming convention is ok. Looking at a couple of other Laravel Scout packages, they're all named laravel-scout-x-driver.

Eg:

Should we also change this repo/package name to laravel-scout-typesense-driver? Is there a common convention?

Also, is a Laravel Scout "engine" different from a Scout "driver"?

from laravel-scout-typesense-driver.

hi019 avatar hi019 commented on July 21, 2024

@jasonbosco Can you wait until tomorrow to publish the package? I forgot to integrate the bulk delete API route I mentioned earlier in this Issue. It would likely be a small breaking change, so it would be easier to just put that change in the migration notes rather than publish a new major version

from laravel-scout-typesense-driver.

hi019 avatar hi019 commented on July 21, 2024

Unfortunately I won't have time to do this today, will complete it tomorrow or by monday

from laravel-scout-typesense-driver.

hi019 avatar hi019 commented on July 21, 2024

@jasonbosco Ready for release

from laravel-scout-typesense-driver.

jasonbosco avatar jasonbosco commented on July 21, 2024

@hi019 Thank you. I've published an RC version of the package here: https://packagist.org/packages/typesense/laravel-scout-typesense-driver

Could you give it a shot and let me know if it works ok?

from laravel-scout-typesense-driver.

manavo avatar manavo commented on July 21, 2024

I'm getting errors on the soft delete checks:

ErrorException: Undefined property: Typesense\LaravelTypesense\Engines\TypesenseEngine::$softDelete

from laravel-scout-typesense-driver.

manavo avatar manavo commented on July 21, 2024

I've made PR #5 to fix it

from laravel-scout-typesense-driver.

manavo avatar manavo commented on July 21, 2024

Bulk deleting isn't working for me either, I get an error like:

Typesense\Exceptions\ObjectNotFound: Could not find a filter field named `{TABLE_NAME}.id` in the schema

Where {TABLE_NAME} is the actual table name of course.

Since the table name leads to the collection, I'm guessing it maybe needs to be the unqualified name that we use? (without the table name?)

from laravel-scout-typesense-driver.

manavo avatar manavo commented on July 21, 2024

The issue is solved if I specifically define the getScoutKeyName() method:

    public function getScoutKeyName() {
        return 'id';
    }

But it would be good if this worked without needing to explicitly define that!

EDIT: Scrap that, it didn't work either!

from laravel-scout-typesense-driver.

hi019 avatar hi019 commented on July 21, 2024

I'll look into it later today @manavo . Do your models use the trait Laravel\Scout\Searchable? It defines a getScoutKeyName method.

from laravel-scout-typesense-driver.

manavo avatar manavo commented on July 21, 2024

Yep, it uses the trait, but the one in the trait does this:

    public function getScoutKeyName()
    {
        return $this->getQualifiedKeyName();
    }

And it makes me think that it is meant to be used in the Eloquent Query Builder, more than in the engines/drivers.

Even when I forced it to be just id instead of {TABLE_NAME}.id, I still get this error:

Could not find a filter field named `id` in the schema

So I'm not sure why that is. I'm guessing Typesense should let us filter by id?

from laravel-scout-typesense-driver.

manavo avatar manavo commented on July 21, 2024

I'm also running version 0.17.0 of Typesense, so I'll try and upgrade and see what happens.

from laravel-scout-typesense-driver.

hi019 avatar hi019 commented on July 21, 2024

@manavo Do you mind creating a new issue for the delete problem so that it's easier to track?

from laravel-scout-typesense-driver.

manavo avatar manavo commented on July 21, 2024

Same issue after the upgrade. No problem, I'll create a separate issue.

from laravel-scout-typesense-driver.

manavo avatar manavo commented on July 21, 2024

Moved to issue #6, and added some extra detail there @hi019

from laravel-scout-typesense-driver.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.