Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Search Criteria for SCJD Beta

 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So what's everyone's opinions on which fields to provide as searchable fields.
In the instructions.html I can only guess that it only searches of type of Service only. Which would be simple enough because you only need one drop down, and use regex package to search in the comma delimited field.
Or do you feel we should include searching capability on Contractor Name, Location (city and state seperately), and a CheckBox to show only available subcontractors? Now this would be more than is required, and you know what I say about that. Don't go overboard, especially if there isn't much time to complete the assignment.
Mark
 
Tybon Wu
Ranch Hand
Posts: 84
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The instruction doesn't actually say which fields to search through. For my implementation, I just search through all fields. For example if you pass in {"Dave", "$4"} it will return the record numbers of all records that has a field that begins with "Dave" or "$4" Maybe you have a different idea on what it should do?
 
Dayanand Kangala
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Mark Spritzler:
So what's everyone's opinions on which fields to provide as searchable fields.
In the instructions.html I can only guess that it only searches of type of Service only. Which would be simple enough because you only need one drop down, and use regex package to search in the comma delimited field.
Or do you feel we should include searching capability on Contractor Name, Location (city and state seperately), and a CheckBox to show only available subcontractors? Now this would be more than is required, and you know what I say about that. Don't go overboard, especially if there isn't much time to complete the assignment.
Mark

Hi Mark,
I read the following statement in the instructions:
"...They take requests from home owners for a type of service, and offer the homeowner one or more contractors that can provide the required services..."
Based on the above, isn't it enough to implement the search based on "Specialties" alone?!
What do you mean by "comma delimited field."?!
Dayanand.
 
Dayanand Kangala
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Mark Spritzler:
So what's everyone's opinions on which fields to provide as searchable fields.
In the instructions.html I can only guess that it only searches of type of Service only. Which would be simple enough because you only need one drop down, and use regex package to search in the comma delimited field.
Or do you feel we should include searching capability on Contractor Name, Location (city and state seperately), and a CheckBox to show only available subcontractors? Now this would be more than is required, and you know what I say about that. Don't go overboard, especially if there isn't much time to complete the assignment.
Mark


Are you reading all the contractor details and storing them as CSVs in a static member variable?!
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The specialties is listed seperated by commas.
For instance Joe Contractor can do 'Woodwork, Concrete, Kitchen Remodeling, Roofing'.
The above quote string would be the value for the specialties field.
Mark
 
Tybon Wu
Ranch Hand
Posts: 84
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

For instance Joe Contractor can do 'Woodwork, Concrete, Kitchen Remodeling, Roofing'.

According to the interface: "...matches are performed from the start of the field up to the end of the criteria string. For example, Fred matches Fred or Freddy."
This means if I search for "Conrete" I will not get the record number for Joe Contractor. I have to start the search string with Woodwork to get a match. That doesn't sound very flexible to me. It makes more sense to match any substrings of the field.
 
Valentin Crettaz
Gold Digger
Sheriff
Posts: 7610
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Personally, I match any substring within the field value, that is, the criteria "Fred" will match any of "Freddy", "JoeFred", "JoeFredJim", and that's what I call flexible
I'm wondering if I should provide a way of doing the search case insensitively :roll:
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I agree with Valentin. I get the sense that they want us to use more of the 1.4 new stuff, and regex is new, and this field highly lends to using it to make our searches easier.
And using the regex, you can take the entered value and make a regular expression that search case insensitive. We can also get the unique values already in the fields using StringTokenizer to seperate the commas then only insert unique values into a HashSet and return the Array to the GUI and display it in a JComboBox.
Mark
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic