2

For example I'm looking for a specific string in a list of files. Is there a single word for a-thing-that-I-search-for? I could only thing of a Holy Grail, but that's too sophisticated for normal use. I would prefer a common noun.

I tried to use Google, but it's hard to find information that relates to searching process itself...

  • 5
    well it's "search term". or what about something like "target". – Fattie Jun 28 '15 at 6:01
  • 2
    Query? That's one of the technical terms used I believe. – Huey Jun 28 '15 at 6:23
  • 1
    @JoeBlow could you post "search term" as an answer? I really like it and would like to make it an accepted answer. – nuoritoveri Jun 28 '15 at 7:53
  • Search term as a name for what is sought confuses use with mention. See my answer. – Drew Jun 28 '15 at 14:36
  • @Huey - I would think "quarry" would be better than "query". – Hot Licks Jun 28 '15 at 19:11
4

You're just looking for:

"search term"

this is universally used everywhere - for example, you need only look in the menus of many apps on your Mac/PC ("set search term" etc). You do sometimes see "search text" rather than search term.

Note too that you could simply use say "search" - that would make a nice variable name. You could also use say "target" if you're looking for a variable name. (In reality it would be much more complicated, you'd be keeping a stack of them etc.)

In any event if you're looking for the word to call it to consumers, it's "search term" or perhaps "search text".

(By all means, even "search string" is fine: in some contexts, à la my conversation with FreeRad, that would indeed be the specific, natural choice in a, uhh, multi-paradigm situation: searchImage, searchColor, searchString, etc.)

  • Surely 'search term' refers to one of the elements of the 'search string'. It does not refer to the 'thing' that is being sought. – andyb Nov 4 '15 at 0:48
4

The object of the search is the generic term for what is being searched for. The object of the search might be a particular string or it might be the car that best matches my needs. Or it might be the drugs the police think may be in the car [see below]

Here's some example uses:

Criminal Procedure for the Criminal Justice Professional:

...the officer opens a closed container found within the car that might reasonably hold the object of the search.

Chinese Theories of Reading and Writing: A Route to ...:

The object of the search is a lover.
The poem is so worded that the object of the search is completely veiled ...

  • This answer is correct, IMO. It does not confuse what is sought with what is found. – Drew Jun 29 '15 at 15:19
3

I disagree that search term or search text (@JoeBlow's answer) is what is sought. These are names for the search pattern that is matched (in some way) against the universe of discourse to find matches (search hits).

They provide a map, or clues to finding what is sought - they are not what is sought.

Each of the matches found is possibly what was sought. But it is not necessarily what was sought. It is possible that the search method is not perfect and it finds false positives - the search method finds hits that satisfy its rules and design, but these hits might not correspond to what the searcher really seeks.

And it is possible for a search to yield no search hits, even though there are real objects in the universe that correspond to what was sought. This can happen because either the search-pattern definition system or the search method is inadequate.

To me, a reasonable answer to What is the name for the thing that we search for? is the sought or the query object or the search target. Perhaps there is a better name for it; dunno.

In a different sense, you can conflate what is sought with what is found, and in this sense an answer to the question could be a search hit.

But IMO the answer is certainly not search term, search text, or search pattern. Those are simply part of the means of expressing the query - ways to describe or specify what is sought.

If I am looking for my car, then my car is what is sought. A description of my car: its make, model, color, year, etc., is not my car. I am not looking for a description of my car. I am providing you with a description of my car as a means to help find it.

My car is the search target. A description of my car is the search text, or search pattern. Matches, or search hits, that are the result of searching are the set of cars that fit the search pattern. with luck, one of those cars is what was sought, the search target.


Update after @JoeBlow's comment questions, in hopes it makes things clearer:

If you are looking for a filename string then that is the search target: the thing you are looking for. You provide a search pattern of some sort to a search engine of some sort, which looks for pattern matches among the candidates (the file names in your list). The pattern matches found, if any, are search hits. If you provide a good search pattern then one of the search hits will presumably be the target you seek.

The point is that what you are looking for and the search pattern you provide to try to find it are different things. (In the case of a string target and a string pattern, they could be the same string of text, but they need not be for most matching.) And the search hits that are found by matching your pattern are also not the same as what you are looking for. One or more of them might be what you are looking for, but that's not true in general.

How many times has Google not found what you were looking for? That can be because (a) your search pattern was not good enough, (b) Google search/indexing methods are not good enough, or (c) what you were looking for is not in the universe of Google data - it is not there to be found.

  • @JoeBlow: (1) No idea what you are saying; sorry. (2) If the OP is looking for a filename string then that is the search target: the thing that is sought. A search pattern of some sort is used by a search engine to search for it. The pattern matches found are search hits, one of which is presumably the target that was sought. – Drew Jun 29 '15 at 4:27
  • LOL fair enough Drew ... – Fattie Jun 29 '15 at 4:30
  • I don't think I've ever heard the term "search target" used in my software engineering travels. Any result of a search I have always referred to as a "search result". Google's UI roughly does the same, listing them as "About X results (y secs)" on the top of the result page. The string used to initiate a search is usually, "query string", "search string" or just "input" to the search algorithm. – Chris Subagio Jun 29 '15 at 5:13
  • @ChrisSubagio: A search result (search hit) is not necessarily what was sought - your search target. A search result is what was found. If search finds your target then yes, the target is one of the search results. If search does not find it, it is not a search result. And there can be additional results of your search that do not correspond to your target. Do not confuse what you are looking for (OP question) with what is found. And BTW, Jim provided another good answer to the question: the object of the search is the same thing as the search target - what you are looking for. – Drew Jun 29 '15 at 15:15
1

By analogy with the common idiom, PHP describes the sought string as the needle and the containing string as the haystack. It's fairly idiosyncratic, but it might work for your context, especially if you're writing technical documentation for people who might know some PHP.

  • 1
    Since PHP is a technical rather than vernacular (in general English) term, an explanation would be appropriate. – Edwin Ashworth Jun 28 '15 at 8:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.