How to Ignore Certain terms in search using Fusejs? The 2019 Stack Overflow Developer Survey Results Are InHow do JavaScript closures work?How do I check if an element is hidden in jQuery?How do I remove a property from a JavaScript object?How do I redirect to another webpage?How do I include a JavaScript file in another JavaScript file?How to replace all occurrences of a string in JavaScriptWhy is the Android emulator so slow? How can we speed up the Android emulator?How to check whether a string contains a substring in JavaScript?How do I remove a particular element from an array in JavaScript?How do I return the response from an asynchronous call?

What is this sharp, curved notch on my knife for?

How do I free up internal storage if I don't have any apps downloaded?

Will it cause any balance problems to have PCs level up and gain the benefits of a long rest mid-fight?

What could be the right powersource for 15 seconds lifespan disposable giant chainsaw?

Why not take a picture of a closer black hole?

Short story: child made less intelligent and less attractive

Why doesn't UInt have a toDouble()?

What can I do if neighbor is blocking my solar panels intentionally

Ubuntu Server install with full GUI

Why can't devices on different VLANs, but on the same subnet, communicate?

How can I define good in a religion that claims no moral authority?

How do PCB vias affect signal quality?

What to do when moving next to a bird sanctuary with a loosely-domesticated cat?

How did passengers keep warm on sail ships?

Is it ok to offer lower paid work as a trial period before negotiating for a full-time job?

A word that means fill it to the required quantity

Why does the nucleus not repel itself?

Can withdrawing asylum be illegal?

Falsification in Math vs Science

What is the meaning of Triage in Cybersec world?

Are there any other methods to apply to solving simultaneous equations?

A female thief is not sold to make restitution -- so what happens instead?

Can there be female White Walkers?

Why can I use a list index as an indexing variable in a for loop?



How to Ignore Certain terms in search using Fusejs?



The 2019 Stack Overflow Developer Survey Results Are InHow do JavaScript closures work?How do I check if an element is hidden in jQuery?How do I remove a property from a JavaScript object?How do I redirect to another webpage?How do I include a JavaScript file in another JavaScript file?How to replace all occurrences of a string in JavaScriptWhy is the Android emulator so slow? How can we speed up the Android emulator?How to check whether a string contains a substring in JavaScript?How do I remove a particular element from an array in JavaScript?How do I return the response from an asynchronous call?



.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








1















I want to create a search using fusejs, in which an entity or keyword can have multiple names, (alias). In fusejs the score is calculated based on the user input, he/she can enter any of the names.
In my data i can have only 1 name.
For Example: "House"



[
"label": "House No. 436, Street 12, Phase 3"
]


If a user enter "house" it works perfectly, but what if user enter Plot no, or home no, apartment no , flat no or any such word. In that case the score calculated will effect the search results.
Please let me know if there is any way out for this.










share|improve this question




























    1















    I want to create a search using fusejs, in which an entity or keyword can have multiple names, (alias). In fusejs the score is calculated based on the user input, he/she can enter any of the names.
    In my data i can have only 1 name.
    For Example: "House"



    [
    "label": "House No. 436, Street 12, Phase 3"
    ]


    If a user enter "house" it works perfectly, but what if user enter Plot no, or home no, apartment no , flat no or any such word. In that case the score calculated will effect the search results.
    Please let me know if there is any way out for this.










    share|improve this question
























      1












      1








      1








      I want to create a search using fusejs, in which an entity or keyword can have multiple names, (alias). In fusejs the score is calculated based on the user input, he/she can enter any of the names.
      In my data i can have only 1 name.
      For Example: "House"



      [
      "label": "House No. 436, Street 12, Phase 3"
      ]


      If a user enter "house" it works perfectly, but what if user enter Plot no, or home no, apartment no , flat no or any such word. In that case the score calculated will effect the search results.
      Please let me know if there is any way out for this.










      share|improve this question














      I want to create a search using fusejs, in which an entity or keyword can have multiple names, (alias). In fusejs the score is calculated based on the user input, he/she can enter any of the names.
      In my data i can have only 1 name.
      For Example: "House"



      [
      "label": "House No. 436, Street 12, Phase 3"
      ]


      If a user enter "house" it works perfectly, but what if user enter Plot no, or home no, apartment no , flat no or any such word. In that case the score calculated will effect the search results.
      Please let me know if there is any way out for this.







      javascript performance fuse.js






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Mar 8 at 11:11









      saadat alisaadat ali

      239




      239






















          1 Answer
          1






          active

          oldest

          votes


















          1














          I solved this problem by adding a new array containing all the alias to each object.



          ["label": "House No. 436, Street 12, Phase 3", tags: ["Plot No", "Flat no", "Apartment no"]]


          and so on. And then i applied the weighted search with 0.7 weight to the variable label and 0.3 to array of alias.



           keys: [
          name: 'tags',
          weight: 0.3
          ,
          name: 'label',
          weight: 0.7
          ]
          };


          Now if user inputs any of the keyword, it will have same impact, Thus the actual search results are not effected.






          share|improve this answer























            Your Answer






            StackExchange.ifUsing("editor", function ()
            StackExchange.using("externalEditor", function ()
            StackExchange.using("snippets", function ()
            StackExchange.snippets.init();
            );
            );
            , "code-snippets");

            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "1"
            ;
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function()
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled)
            StackExchange.using("snippets", function()
            createEditor();
            );

            else
            createEditor();

            );

            function createEditor()
            StackExchange.prepareEditor(
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader:
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            ,
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );













            draft saved

            draft discarded


















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55061997%2fhow-to-ignore-certain-terms-in-search-using-fusejs%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            1














            I solved this problem by adding a new array containing all the alias to each object.



            ["label": "House No. 436, Street 12, Phase 3", tags: ["Plot No", "Flat no", "Apartment no"]]


            and so on. And then i applied the weighted search with 0.7 weight to the variable label and 0.3 to array of alias.



             keys: [
            name: 'tags',
            weight: 0.3
            ,
            name: 'label',
            weight: 0.7
            ]
            };


            Now if user inputs any of the keyword, it will have same impact, Thus the actual search results are not effected.






            share|improve this answer



























              1














              I solved this problem by adding a new array containing all the alias to each object.



              ["label": "House No. 436, Street 12, Phase 3", tags: ["Plot No", "Flat no", "Apartment no"]]


              and so on. And then i applied the weighted search with 0.7 weight to the variable label and 0.3 to array of alias.



               keys: [
              name: 'tags',
              weight: 0.3
              ,
              name: 'label',
              weight: 0.7
              ]
              };


              Now if user inputs any of the keyword, it will have same impact, Thus the actual search results are not effected.






              share|improve this answer

























                1












                1








                1







                I solved this problem by adding a new array containing all the alias to each object.



                ["label": "House No. 436, Street 12, Phase 3", tags: ["Plot No", "Flat no", "Apartment no"]]


                and so on. And then i applied the weighted search with 0.7 weight to the variable label and 0.3 to array of alias.



                 keys: [
                name: 'tags',
                weight: 0.3
                ,
                name: 'label',
                weight: 0.7
                ]
                };


                Now if user inputs any of the keyword, it will have same impact, Thus the actual search results are not effected.






                share|improve this answer













                I solved this problem by adding a new array containing all the alias to each object.



                ["label": "House No. 436, Street 12, Phase 3", tags: ["Plot No", "Flat no", "Apartment no"]]


                and so on. And then i applied the weighted search with 0.7 weight to the variable label and 0.3 to array of alias.



                 keys: [
                name: 'tags',
                weight: 0.3
                ,
                name: 'label',
                weight: 0.7
                ]
                };


                Now if user inputs any of the keyword, it will have same impact, Thus the actual search results are not effected.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Mar 11 at 5:13









                saadat alisaadat ali

                239




                239





























                    draft saved

                    draft discarded
















































                    Thanks for contributing an answer to Stack Overflow!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid


                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.

                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55061997%2fhow-to-ignore-certain-terms-in-search-using-fusejs%23new-answer', 'question_page');

                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    Save data to MySQL database using ExtJS and PHP [closed]2019 Community Moderator ElectionHow can I prevent SQL injection in PHP?Which MySQL data type to use for storing boolean valuesPHP: Delete an element from an arrayHow do I connect to a MySQL Database in Python?Should I use the datetime or timestamp data type in MySQL?How to get a list of MySQL user accountsHow Do You Parse and Process HTML/XML in PHP?Reference — What does this symbol mean in PHP?How does PHP 'foreach' actually work?Why shouldn't I use mysql_* functions in PHP?

                    Compiling GNU Global with universal-ctags support Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern) Data science time! April 2019 and salary with experience The Ask Question Wizard is Live!Tags for Emacs: Relationship between etags, ebrowse, cscope, GNU Global and exuberant ctagsVim and Ctags tips and trickscscope or ctags why choose one over the other?scons and ctagsctags cannot open option file “.ctags”Adding tag scopes in universal-ctagsShould I use Universal-ctags?Universal ctags on WindowsHow do I install GNU Global with universal ctags support using Homebrew?Universal ctags with emacsHow to highlight ctags generated by Universal Ctags in Vim?

                    Add ONERROR event to image from jsp tldHow to add an image to a JPanel?Saving image from PHP URLHTML img scalingCheck if an image is loaded (no errors) with jQueryHow to force an <img> to take up width, even if the image is not loadedHow do I populate hidden form field with a value set in Spring ControllerStyling Raw elements Generated from JSP tagds with Jquery MobileLimit resizing of images with explicitly set width and height attributeserror TLD use in a jsp fileJsp tld files cannot be resolved