Git Product home page Git Product logo

Comments (6)

arunoda avatar arunoda commented on June 2, 2024

Currently we don't support nested level fields.
But what's the error you are getting?

from search-source.

elGusto avatar elGusto commented on June 2, 2024

I am getting this:

Exception in template helper: TypeError: undefined is not a function

for this code

return UsersSearch.getData({
  transform: function(matchText, regExp) {
    return matchText.replace(regExp, "<b>$&</b>")
  },
  sort: {isoScore: -1}
});

At the return matchText.replace line

from search-source.

arunoda avatar arunoda commented on June 2, 2024

Okay. I know the issue.
I'll make a fix.

BTW: How do you define fields?
As a fix. Try to send fields without nested fields from the server

On Mon Jan 12 2015 at 4:29:20 PM Gus [email protected] wrote:

I am getting this:

Exception in template helper: TypeError: undefined is not a function

for this code

return UsersSearch.getData({
transform: function(matchText, regExp) {
return matchText.replace(regExp, "$&")
},
sort: {isoScore: -1}
});

At the return matchText.replace line


Reply to this email directly or view it on GitHub
#4 (comment)
.

from search-source.

elGusto avatar elGusto commented on June 2, 2024

In fact, I was doing things in a wrong way... Sorry to have disturbed.
My mistake was to define the emails field and not the emails.address like it should be.

The package is fine, I can search users on any field I want (nested or not)

I define my fields like this:

UsersSearch = new SearchSource('users',
['emails.address', 'profile.firstName', 'profile.lastName'],
options);

Thank you for this package, it is the best meteor search solution I saw so far (fast and easy to implement).

from search-source.

rafaelcorreiapoli avatar rafaelcorreiapoli commented on June 2, 2024

Hi! I'm having this problem, can you tell me how you solved it @elGusto ?
I have a field called profile.fullName and it does not works with the transformation function...
I'm using ES backend

SearchSources.userSearch = new SearchSource('userSearch',
  ['profile.fullName', 'username'],
  SEARCH_OPTIONS);

ps: username works just fine

from search-source.

elGusto avatar elGusto commented on June 2, 2024

@rafaelcorreiapoli I don't recall, but judging from the thread, it was an error from me. Like I was using 'emails.address' instead of 'emails.$.adress' or something similar.
Sorry I cannot be of more help...

from search-source.

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.