Coder Social home page Coder Social logo

Search about hackweek HOT 12 CLOSED

hennevogel avatar hennevogel commented on September 13, 2024
Search

from hackweek.

Comments (12)

jordimassaguerpla avatar jordimassaguerpla commented on September 13, 2024

I'd love to work on this. Please assign it to me :)

from hackweek.

jordimassaguerpla avatar jordimassaguerpla commented on September 13, 2024

We have a simple search in place now that use solr. However, there are still 2 issues to fix:

  • substring search does not work. For example, searching for node does not match nodejs.
  • we should have a monitoring process since if solr were not working, any insert into the db would create an exception.

from hackweek.

jordimassaguerpla avatar jordimassaguerpla commented on September 13, 2024

a part from substring, it would be great to do other advanced stuff like github does with the limiter, for example:

if q is @user, it searches only users

from hackweek.

jordimassaguerpla avatar jordimassaguerpla commented on September 13, 2024

for substring

#57

from hackweek.

jordimassaguerpla avatar jordimassaguerpla commented on September 13, 2024

Regarding the parser. The default parser includes operators like "+/-" and "NOT", as well as phrases (use " ). However it does not include extended search capabilities.

from hackweek.

vpereira avatar vpereira commented on September 13, 2024

I'm late on that ticket, but wouldn't be better to go with ElasticSearch? One advantage, would be to be able to import the wiki files directly, without parse and convert to csv and maybe some realtime search function..

from hackweek.

jordimassaguerpla avatar jordimassaguerpla commented on September 13, 2024

You are right: you are late :-)

Why don't you send us a pull request ;-) ?

from hackweek.

vpereira avatar vpereira commented on September 13, 2024

hm, as a wise woman once said:

ich habe leider kein foto pull request fΓΌr dich :)

the question is if the pull request would be accepted :) because actually, adding the gem tire, would be basically to remove the searchable block and add on the model project ( warning untested code) :

include Tire::Model::Search
include Tire::Model::Callbacks

mapping do
    indexes :title, analyzer => 'snowball', :boost => 100
    indexes :description, :analyzer => 'snowball'
    indexes :created_at, :type => 'date'
end

def self.search(params)
  tire.search(load: true) do
    query { string params[:q], default_operator: "AND" } if params[:q].present?
    sort { by :created_at, 'desc' }
end

I just stumbled on that, cause I was kind of playing with the tools (you can see my changes here https://github.com/vpereira/hackweek/blob/master/tools/lib/hackweek_tool.rb and at https://github.com/vpereira/hackweek/blob/master/tools) and maybe the whole wiki conversion before import wouldn't be necessary, cause wikimedia files can be directly indexed using elasticsearch..

from hackweek.

jordimassaguerpla avatar jordimassaguerpla commented on September 13, 2024

Hi! I wanted to finish the search this week ( that is why I said you were late :-) ) because it is hackweek in SUSE. I was not aware of the tools and the import wiki. I selected solr because we are using it in another project and so I could look at how was implemented / deployed there, and because I did not find any feature that was in elastic search and not in solr that we require (I was not aware of the import wiki one).

That said, which is your "timeframe" for your features? It is a hackweek project, too? Can we plan to do that on the next hackweek?

from hackweek.

jordimassaguerpla avatar jordimassaguerpla commented on September 13, 2024

By the way, it is not only those changes you mention, but also we should make sure the tests pass:

#61

that travis runs properly: see the before and after scripst at:

https://github.com/SUSE/hackweek/blob/master/.travis.yml

that we update the deploy configuration

https://github.com/SUSE/hackweek/blob/master/config/deploy.rb

and that we setup and configure properly elasticsearch to at least have the same analyzers we have now: lemmer and gram (see the tests to know what does this mean)

from hackweek.

vpereira avatar vpereira commented on September 13, 2024

my timeframe is: I must pack my stuffs and run, cause my train living in 45 minutes :)

the test cases, weren't there when I went through this tickets, so that's why I didn't wrote a line about it, sorry. But IMO it shouldn't be tested by unit testing, instead it should be stubbed (opinion is opinion, it doesn't mean that I'm right), mainly because as soon as you call the search method, you are testing solr or tire that is already well tested. For acceptance, maybe make sense, well kind of :)

anyway, maybe for the next hackweek or next week from the hotel room :))

from hackweek.

hennevogel avatar hennevogel commented on September 13, 2024

This is implemented now...

from hackweek.

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.