Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6970437
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T16:42:36+00:00 2026-05-27T16:42:36+00:00

I have been browsing some social network, and found there an ability to search

  • 0

I have been browsing some social network, and found there an ability to search person by: name, age range, city, country and gender.
The interesting thing is all this info may be inserted into one textbox separated by space. Then the search engine some how parses it in very accurate way and return a result list.

On one hand it seems pretty simple: split query by space and search all relevant tables for occurrence. So far so good.
However

  1. There are cities which names are more than 2 words and user may enter them differently as it is free text.
  2. There are names that are more than 2 words

Question:

How can we split the query in such way, that we certainly know which
part of it should be searched where? i.e. name in user table, city
in cities table, country in countries etc.?

What i have done so far is:

  1. fill users datasource with all the users
  2. Check if Country from Countries tableexist in the query
  3. if exist then filter datasource to have users from that country only
  4. Check if from Cities table exist in the query
  5. if exist then filter datasource to have users from that city only

and so on for each table, while each time we find a match in the table- we remove the found part from the query, leaving us with the most free parameter: the name.

This seems to work if user would have known exactly how the cities/ countries etc. are written in my db,
but the reality is that user may enter a part of the city or mistype the city.

I don’t know if i am in the right direction at all with what i have done. Is just a point of start…

PS: I just need an algorithm flow, so programming language doesn’t really meters. Any Idea or guidance is more than welcome.

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T16:42:37+00:00Added an answer on May 27, 2026 at 4:42 pm

    These kind of queries is not good for relational databases. If it is not a must, you may think to use Lucene.Net(c#) or Lucene(java)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been browsing some php source code and need to know how the
I have been browsing around on the internet and researching effective sitemap web pages.
I have been browsing SO and various other sites to find out whether this
Have been looking on some tutorials for drawing canvas using SurfaceView, but the only
I'm looking to add password-reset functionality to my site and have been browsing the
Hey guys, I've been browsing around on SO for quite some time and can't
I have been browsing this site for the answer but I'm still a little
I have been looking for a solution and I found many different opinions to
I've been browsing a lot of perl C library extensions and have noticed, especially
I've been given some XML files that don't quite have a proper schema (I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.