Ticket: Faceted Search not working

The faceted search is not working when I change



mflix.useFacets = true

I get this error in chrome dev tools:
(index):1 Uncaught ReferenceError: mflix is not defined

Hello Raymond_22576,
You should use
instead of
**mflix.useFacets = true**

It still doesn’t work
Can you show me an example of your implementation i.e screenshot of code and actual UI

See Line No -> 13

That isn’t working, code equal as you.

Hello Manuel_41582,
Also,you need to do some modification in MoviesDAO.js file

Hope, this will help you.
plz, let me know if this works or not.

Same problem here, whatever I change that script block to it doesn’t work(I should see more search option in the webpage right?)


I don’t even have a development /build/index.html as it is minimized in the handout archive.

MoivesDAO.js should be fine as it passed the test for that ticket.

Hi @Attila_Janos_72136,

Please let us know if your integration test is passing for Facet Search or not. I mean please take a look at status page.

If that does not help, please share the code so that we can debug more.


Same issues here -

  • Yes, Status is now Passing for Faceted Search = 5aa7d3948adcc3fb770f06fb

  • But U/I gives user nothing new ( ? ) to indicate metacritic rating ( ? )

  • My screen looks exactly like screenshot from Attila_Janos_72136 re: search box and “Cast” radio button

  • Q. Shouldn’t there be some new U/I widget to click to indicate facet for metacritic rating?

  • Only edits done:

  • Edit done to index.html per above: <script>window.mflix=true</script>
  • (Quite different from Ticket information, which was: <script>mflix.useFacets = true</script> )
  • No perceived change to U/I

  • Edit done to moviesDAO.js = nothing more than adding those 3 stages to the queryPipeline array: skipStage, limitStage, facetStage
  • The above got the Status to Pass

Am using latest Chrome browser, on updated Mac 10.13.6

Would be helpful to see a picture of screenshot that shows how this metacritic facet user control is supposed to look ?

Thank you!
I am sorry to have to say this but by far this has been a nightmare… I think I have learn to debug larger application from this course than actual learning mongodb :frowning:

I have the same issue.

Hi Everyone,

Thanks for reporting the issue. Our team is working on this one.
But I believe you will be able to get pass the Lab. If you are getting issues with the Lab, then let me know.


how do i verify, the test data i am using has right dataset, which is causing the test to fail.
expect(actual.rating.length).toBe(5) returning - 4
expect(actual.rating.length).toBe(3) returning - 4
i am guessing this could be due to change in data set, please share your thoughts db.movies.aggregate([{$group:{_id:’’,totalRecords:{$sum:1}}}]) – output
{ “_id” : “”, “totalRecords” : 23539 }

This is correct. Please re-check your query in the function. :slight_smile:


Hello, the most I search… I cannot find moviesdao.js in my project…

Hi @Jose_Luis_28345,

The file location is: mflix-js/src/dao/moviesDAO.js. If you do not see this file, please re-download the zip handout again.


Sorry I was wrong… I’m in the Java course, not the JSCourse… :slight_smile:

oh! :smiley: No Issues.

If you have any issue, please post it here.


How can I solve this error?

The error suggests that the actual returning from the function is not receiving any movies. Please check the code for facetedSearch and let me know if you need help.